monim67 / django-bootstrap-datepicker-plus

Bootstrap3/Bootstrap4/Bootstrap5 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput with date-range-picker functionality for django >= 2.0
https://pypi.python.org/pypi/django-bootstrap-datepicker-plus
MIT License
223 stars 63 forks source link

Event handling #34

Closed rg-software closed 1 year ago

rg-software commented 5 years ago

I would truly appreciate a good advice in my problem. I want to handle events of the datepicker, but events aren't covered in the documentation.

I only need a simple JS function call for HTML DOM events, so I expected this code to work:

self.fields['my_calendar'].widget.attrs['onchange'] = 'checkDate();'

It renders correctly in HTML, but the onchange event is never generated! Same with onselect. Is there anything I can do?

monim67 commented 1 year ago

From version 5.0.0 event handlers can be registered. Details on customization.