Open woxman opened 1 year ago
Your code in https://github.com/mymth/vanillajs-datepicker/issues/20#issuecomment-1186140439 seems to work if the showMessage()
function is in global scope.
I think using event delegation like this: https://codepen.io/mymth/pen/mdxRWqB would be safer.
You have to listen to the changeDate
event, lost a fair amount of time because I was looking for the standard input onChange
event.
datePickerInput.addEventListener('changeDate', onChange)
I am getting Property 'addEventListener' does not exist on type 'Datepicker'.
You have to call it on the input, not the DatePicker instance
please help , i can get clicked date