-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datepicker is not showing #75
Comments
@Hiieu Try to change "datetime" by the name of one of your models. |
Aaah can't do that. MyModel have to have DateField() |
I think that what @fercreek meant was change 'datetime' to 'start_date' or 'end_date' |
Unfortunately it is still not working
I got bootstrap.js and bootsrap.min.css and jquery 1.8.3 and {{ form.media }} |
widgets = { |
@fercreek What is the name of the field in your model you want to use this widget with? |
@Hiieu does it matter that you are using a DateTimeWidget with a DateField not a DateTimeField? I do it like so: |
Same issue. Amplifying data: I receive this message in the JS console: 'TypeError: $(...).datetimepicker is not a function' |
@David-OConnor Check what HTML is actually getting generated by In my case, I'd accidentally typo'd a field name, which caused Django to omit the CSS and JS associated with DateTimeWidget since no field on the page used it. If it IS working, make sure you're NOT doing the perceptual optimization of loading your JavaScript in the page footer like the Bootstrap people tell you to do. This widget injects inline JavaScript into the page body, which means (The long-term solution is to rework the JS so configuration is done using |
Thanks; will check that out when I'm back home in a month. |
I'm thinking ... the "$(#.......)" javascript runs BEFORE you have loaded jquery. If you load jquery in head, then it shouldn't be a problem. If you load it in the bottom of the doc, then you might see this err. |
I had this issue as well, but I was able to fix it. The things I checked (and forgot to do):
|
I have all requirements. So I think something is wrong with my model or form
The text was updated successfully, but these errors were encountered: