Bootstrap3/Bootstrap4/Bootstrap5 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput with date-range-picker functionality for django >= 2.0
223
stars
63
forks
source link
MEDIA is called twice #51
Closed
andytwoods closed 1 year ago
Hi, I load manually load CSS and JS in my template for my ModelForm DateTime field. I dont load in {{ form.media.js }} as this is already loaded.
The form works fine. But I get this error
Uncaught TypeError: Cannot read property 'Constructor' of undefined
Examination of html reveals that this JS and CSS is called, in MEDIA: https://github.com/monim67/django-bootstrap-datepicker-plus/blob/91400a3f80546eb046536e902f6825bdfd2f0836/bootstrap_datepicker_plus/_base.py#L50. Manually deleting that CSS and JS removes the console error. Note that the form still works (as I manually add ncessary css and js).
Is there a setting for me to prevent MEDIA js and css being loaded? I've failed to google on this.
With many thanks, Andy.