summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--workshop_app/templates/workshop_app/my_workshops.html4
-rw-r--r--workshop_app/views.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html
index 05ddd57..3fc8e43 100644
--- a/workshop_app/templates/workshop_app/my_workshops.html
+++ b/workshop_app/templates/workshop_app/my_workshops.html
@@ -59,7 +59,7 @@
$('.pDate').datepicker({
changeMonth: true,
changeYear: true,
- minDate: previous_date,
+ minDate: dateToday,
maxDate: upto,
dateFormat:"yy-mm-dd",
});
@@ -71,7 +71,7 @@
$('.rDate').datepicker({
changeMonth: true,
changeYear: true,
- minDate: previous_date,
+ minDate: dateToday,
maxDate: upto,
dateFormat:"yy-mm-dd",
});
diff --git a/workshop_app/views.py b/workshop_app/views.py
index 8d7245f..d0bf2e5 100644
--- a/workshop_app/views.py
+++ b/workshop_app/views.py
@@ -567,7 +567,9 @@ def my_workshops(request):
temp, new_workshop_date = client_data[-2].split("%3D")
cid, workshop_title_id = client_data[1], client_data[2]
workshop_date = client_data[3]
- if workshop_date > new_workshop_date:
+ today = datetime.today().date()
+
+ if str(today) > new_workshop_date:
return HttpResponse("Please Give proper Date!")
else:
result = RequestedWorkshop.objects.filter(