Private
Public Access
1
0

date selector works on plannedsessions

This commit is contained in:
Sander Roosendaal
2018-11-09 12:57:38 +01:00
parent a376c079c7
commit 4955ee8692
7 changed files with 194 additions and 220 deletions

View File

@@ -30,6 +30,7 @@ import numpy as np
import dataprep
import courses
import iso8601
from iso8601 import ParseError
from rowers.tasks import handle_check_race_course
def get_todays_micro(plan,thedate=date.today()):
@@ -411,7 +412,7 @@ def get_dates_timeperiod(request,startdatestring='',enddatestring=''):
startdatestring = request.GET.get('startdate')
enddatestring = request.GET.get('enddate')
if startdate and enddate:
if startdatestring and enddatestring:
startdate = dt.datetime.strptime(startdatestring,'%Y-%m-%d').date()
enddate = dt.datetime.strptime(enddatestring,'%Y-%m-%d').date()
return startdate,enddate