Opened 17 years ago

Closed 17 years ago

#5026 closed (duplicate)

cannot use initial of newforms for selectdatewidget's value

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

Description

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 by Simon G. <dev@…>, 17 years ago

Resolution: duplicate
Status: newclosed

Dupe of #5027

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