Comments (9)
Do you already have loaded jquery library in your page?
Are you getting any 404 errores in network pane in your browser?
from django-bootstrap3-datetimepicker.
Yes, I have loaded jquery in my head before including {{form.media}}
and I'm not getting any 404s
from django-bootstrap3-datetimepicker.
Have you checked the generated html output?
Is id_serviceRequestDate_picker
correct?
Given your field name, it should be id_serviceRequestDate
.
From Django docs:
Its id, in turn, is generated by prepending 'id_' to the field name.
from django-bootstrap3-datetimepicker.
I'm having the same problem... It looks like adding the app to the installed apps doesn't add the javascript files... form.media doesn't either. Or there is a problem with having head in base.html and extending base.html.
from django-bootstrap3-datetimepicker.
Maybe I'm wrong, but simply check the real datepicker id.
I guess it's id_serviceRequestDate
, not id_serviceRequestDate_picker
.
Check it with Firebug or Chrome developer tools.
from django-bootstrap3-datetimepicker.
I figured out the issue. If you change the name of the form you send to the template genorator, say my_form instead of form, you have to use {{my_form.media}}. If you have more then one form with a datepicker it is safe to call {{my_form.media}}{{my_other_form.media}}; resources will not be included twice.
OP must be passing the form under a different name, e.g. service_form, in the return render, which means he's not loading the resources and the datetimepicker function call can't be found thus generating the error he is getting.
from django-bootstrap3-datetimepicker.
Developers you should make a note about this in the readme.
from django-bootstrap3-datetimepicker.
Perhaps write in an example view where you retrieve and pass the form to the return render and highlight that the name of your form in the view must be the name you use in the {{form.media}} tag.
from django-bootstrap3-datetimepicker.
Wait... Maybe I'm wrong about the problem. Either way that was my issues.
from django-bootstrap3-datetimepicker.
Related Issues (20)
- DateTimePicker broken HOT 1
- The django.forms.util module has been renamed. HOT 12
- INSTALLED_APPS signature
- Datepicker is not showing
- Update Datepicker v4 HOT 3
- Please update the PyPI package HOT 5
- Modification of the option "language" to "locale" HOT 5
- Integrating into crispy forms... HOT 1
- Cannot select dates before 1970. HOT 1
- ImportError at / No module named 'widgets'
- Picker always sets field to current date/time, whatever is selected
- from django.forms.util import flatatt is removed in django 1.9.7
- Usage of .size() breaks code
- Doesn't work with Django 1.9 HOT 3
- Change glyphicon icon to other
- Push 2.3.0 release to PyPi
- Django 1.11 support
- Project seems dead ... what fork to use instead? HOT 1
- TypeError: render() got an unexpected keyword argument 'renderer'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-bootstrap3-datetimepicker.