newforms SelectDateWidget preventing errors

2007-09-11 Thread Patrick J. Anderson
Hi, I know that this might not belong in the framework, but since this widget is part of the newforms, I thought I could ask this. I was wondering if this widget could be modified so that when rendering an unbound form, the initial values for month, day and year could be set, as to force the user

Newforms SelectDateWidget does not generate ID

2007-04-22 Thread Brian Victor
I just noticed that the SelectDateWidget in newforms.extras does not generate an ID for the select elements. I'm using that widget as a model for my own, where I need IDs to be set. Although I can hard-code IDs for now, is there a way to make these composite widgets obey the form-related ID sett

Re: newforms SelectDateWidget

2007-02-27 Thread Phil Powell
Thanks Mike - that did the trick. I thought there would be a simple solution - should have RTFM more thoroughly... On 27/02/07, Mike <[EMAIL PROTECTED]> wrote: > > The range function has an optional 'step' argument. > > Howzabout: > > SelectDateWidget(years=range(2006,1900,-1)) > > > But is ther

Re: newforms SelectDateWidget

2007-02-27 Thread Mike
The range function has an optional 'step' argument. Howzabout: SelectDateWidget(years=range(2006,1900,-1)) > But is there an easy way I can make the years display in reverse - > i.e. descending rather than ascending? --~--~-~--~~~---~--~~ You received this mess

newforms SelectDateWidget

2007-02-27 Thread Phil Powell
Just a quick query about the SelectDateWidget: The widget accepts an optional 'years' parameter for displaying a range of years, like this: SelectDateWidget(years = range(1900, 2006)) But is there an easy way I can make the years display in reverse - i.e. descending rather than ascending?