Commit 7bfbffcb authored by David Haynes's avatar David Haynes 🙆
Browse files

Merge branch 'issue#65' into 'master'

Changed the DateTimerPicker() in to update time appropriately. (Closes Issue#65)

Changed ' + timedelta(day=1)'
to  'default=lambda: + timedelta(day = 1)'

Also tested it after the day had changed.

See merge request !32
parents d9adf4d3 838a7fbc
Pipeline #358 passed with stage
in 3 minutes and 43 seconds
......@@ -12,8 +12,7 @@ from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset, Submit, HTML, Div, Field
from crispy_forms.bootstrap import StrictButton, PrependedText, Accordion, AccordionGroup
from bootstrap3_datetime.widgets import DateTimePicker
import datetime
from datetime import date
from datetime import date, datetime, timedelta
class URLForm(forms.ModelForm):
......@@ -89,11 +88,11 @@ class URLForm(forms.ModelForm):
label='Custom Date',
initial=lambda: + timedelta(days=1),
"format": "MM-DD-YYYY",
"pickTime": False,
"defaultDate": ( + datetime.timedelta(hours=24)).strftime("%m-%d-%Y"),
"class": "fa fa-calendar",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment