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'}), }
[image: Inline image 1] Cheers, On Tue, Jan 19, 2016 at 1:46 AM, 'Tom Evans' via Django users < django-users@googlegroups.com> wrote: > On Mon, Jan 18, 2016 at 1:03 AM, sum abiut <suab...@gmail.com> wrote: > > Hi, > > i am having some trouble with my date picker. I probably missing > someting, > > the form fields are displaying fine, but some how the datepicker is no > > displaying. probably something to do with my jquery. Please help > > [ ... ] > > class foregin_exchange_form(forms.ModelForm): > > class Meta: > > model =foreginexchange > > widgets = {'Value_date': > > forms.DateInput(attrs={'class':'datepicker'}),} > > > 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. > > Cheers > > Tom > > -- > 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 django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > 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/CAFHbX1LP8XWTOcwgp3ZMdGOz7XP%2B9srKFEoJ_bWRS9YFbU5Tiw%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > - -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/CAPCf-y70MA%3Ddg73G8%3DNG92EiWLPnkE6dz6_ffQvBwJ6FwfvU7g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.