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.

Reply via email to