Opened 18 years ago
Closed 18 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
  Note:
 See   TracTickets
 for help on using tickets.
    
Dupe of #5027