Commit e871c361 authored by Matthew Rodgers's avatar Matthew Rodgers Committed by David Haynes
Browse files

Added Initial Value for Custom Date Option

--Custom Date didn't have a working initial value.
--Now it does.
parent f07c9dd1
......@@ -93,7 +93,6 @@ class URLForm(forms.ModelForm):
options={
"format": "MM-DD-YYYY",
"pickTime": False,
"defaultDate": "4-20-2016",
},
icon_attrs={
"class": "fa fa-calendar",
......@@ -113,6 +112,9 @@ class URLForm(forms.ModelForm):
self.helper.label_class = 'col-md-1'
self.helper.field_class = 'col-md-6'
#Set Custom Date field initial value to the current date.
self.fields['expires_custom'].initial = datetime.date.today().strftime("%m-%d-%Y")
# The main "layout" defined
self.helper.layout = Layout(
Fieldset('',
......
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