Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
e871c361
Commit
e871c361
authored
Apr 18, 2016
by
Matthew Rodgers
Committed by
David Haynes
Apr 26, 2016
Browse files
Added Initial Value for Custom Date Option
--Custom Date didn't have a working initial value. --Now it does.
parent
f07c9dd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
go/go/forms.py
View file @
e871c361
...
...
@@ -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
(
''
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment