django-bootstrap-datepicker-plus
django-bootstrap-datepicker-plus copied to clipboard
Unable to change options of datetimepicker within javascript
I'm attempting to change an option within the datetimepicker as a result of some user action, but I can't access the datetimepicker in javascript in the way that essentially 100% of sites recommend, which is the following:
$(document).ready(function() {
$('.input-group').datetimepicker({
console.log('I can now change options');
});
});
With the code above, the console.log statement never gets written. Is '.datetimepicker' the correct object to reference within django-bootstrap-datepicker-plus?
Thanks for your help!
The date-picker is bound to the input element. So you need to use selector $('.input-group>input').
Thanks. I'll give this a try!