Code

Opened 7 years ago

Closed 7 years ago

#5026 closed (duplicate)

cannot use initial of newforms for selectdatewidget's value

Reported by: anonymous Owned by: adrian
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:

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

Attachments (0)

Change History (1)

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Dupe of #5027

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.