Hi,
I’m having an issue with KTDatePicker — the event is not triggered when a date is selected.
I’m trying to listen for a date click / selection using the following code:
const calendar = new KTDatePicker('#test-data', {
onClickDate(self, t) {
console.log(self.context.selectedDates);
},
});
calendar.init();
Unfortunately, the onClickDate callback is never executed after selecting a date in the UI
(no logs appear in the console).
Additional details:
the #test-data element exists in the DOM
calendar.init() is called after the page is loaded
the DatePicker renders correctly and the UI itself works
the issue occurs both on the first selection and when selecting another date
Could you please confirm:
whether onClickDate is the correct event for handling date selection?
if there is another event (e.g. onChange, onSelect, etc.) that should be used instead?
or if additional configuration options are required for this event to fire?
Thank you in advance for your help.