On Tue, Jan 19, 2016 at 08:28:00AM +1100, sum abiut wrote:
> Yes i want to have the date picker widget on both DateFields. The date
> picker does not appear on both datefields. i have made changes, but still
> date picker is not showing
> widgets = {
> 'Value_date': forms.DateInput(attrs={'class': 'datepicker'}),
> 'Done_Date': forms.DateInput(attrs={'class':' datepicker'}),
> }Great, another thing you need to do is to follow Tom's advice: > On Tue, Jan 19, 2016 at 1:46 AM, 'Tom Evans' via Django users < > [email protected]> wrote: > > widgets={'Done_Date':forms.DateInput(attrs={'class':'datepicker'}),} > > > > This sets the *class* of the element to "datepicker". > > > > > [ ... ] > > > <script> > > > $(function() { > > > $( "#datepicker" ).datepicker(); > > > }); > > > </script> > > > > This turns an element with the *id* "datepicker" in to a date picker. Trips me every time (maybe when I'm old and wrinkled I'll be able to remember off the top of my head that # is for the id and . is for the class). So yeah, use ``$(".datepicker").datepicker();`` here. Good luck, Michal -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20160118213756.GB20308%40koniiiik.org. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Digital signature

