Opened 8 years ago

Closed 8 years ago

#18976 closed Bug (invalid)

problem with datepicker django widget

Reported by: lukasz.z.grabowski@… Owned by: nobody
Component: Forms Version: 1.4
Severity: Normal Keywords: django admin, django jquery, datepicker, DateTimeShortcuts
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



we have a problem with date picker widget.
We defined form like this :

class GenerateCsvForm(forms.Form):
   Form to get start date and end date.
    start_date = forms.DateField(widget=widgets.AdminDateWidget())
    end_date   = forms.DateField(widget=widgets.AdminDateWidget())

which is used in template - this is basic page which is positng two dates and show some records.
The problem is that in django 1.3.X it was working well - but after migration to django 1.4 we have a JS problem lile:

Uncaught ReferenceError: django is not defined        DateTimeShortcuts.js:205
DateTimeShortcuts.addCalendar                        DateTimeShortcuts.js:205
DateTimeShortcuts.init                  DateTimeShortcuts.js:34

Those errors appear on page load - which leads us to point where second date picker is not render.

Change History (1)

comment:1 Changed 8 years ago by Łukasz Rekucki

Resolution: invalid
Status: newclosed

AdminDateWidget isn't a part of public API, so we can't guarantee it will work outside of the admin app. In this particular case, you don't have a django.jQuery object which is created in jquery.init.js included on every admin page.

Note: See TracTickets for help on using tickets.
Back to Top