Opened 11 years ago

Closed 11 years ago

#5026 closed (duplicate)

cannot use initial of newforms for selectdatewidget's value

Reported by: anonymous Owned by: Adrian Holovaty
Component: Forms Version: master
Severity: Keywords: newforms SelectDateWidget
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


cannot initial the selectdatewidget value in newforms:

class DateForm(forms.form):

date_field = forms.DateField( widget=extras.SelectDateWidget())

def view(request):

data = {"date_field" : "2007-04-07"}
form = DateForm(initial=data)

the form do not initial the date field value

Change History (1)

comment:1 Changed 11 years ago by Simon G. <dev@…>

Resolution: duplicate
Status: newclosed

Dupe of #5027

Note: See TracTickets for help on using tickets.
Back to Top