creating a widget might be an overkill in this case adding a custom class to the input field via the attrs parameter should cover it nicely. i use this approach without the need for a special widget.
On 4/15/07, Ray Cote <[EMAIL PROTECTED]> wrote: > > Thanks, that is very helpful. > > At 11:45 AM -0600 4/14/07, Brian Rosner wrote: > >You will want to check out how to create widgets. Here might be an > >example you are looking for as well as a an example in general. > > > >http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/widgets.py > > > >On > > > >2007-04-14 11:32:53 -0600, Ray Cote <[EMAIL PROTECTED]> said: > > > >> > >> > >> Hello: > >> > >> I'm trying to figure out the approved Django way to add a Javascript > >> date picker (pop-up calendar) to a field while using newforms. > >> > >> One way I see people adding date pickers is to give the field a > >> specific class which the Javascript then attaches to during onload of > >> the page. However, I don't see a way to add a class to a field with > >> newforms. > >> > >> Any help appreciated as I'm fairly new to both Django and JavaScript. > >> --Ray > >> > >> > >> > > > > > > > > > > -- > > Raymond Cote > Appropriate Solutions, Inc. > PO Box 458 ~ Peterborough, NH 03458-0458 > Phone: 603.924.6079 ~ Fax: 603.924.8668 > rgacote(at)AppropriateSolutions.com > www.AppropriateSolutions.com > > > > -- Honza Kr�l E-Mail: [EMAIL PROTECTED] ICQ#: 107471613 Phone: +420 606 678585 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---