detect datepicker on change #256
Unanswered
jerichosiahaya
asked this question in
Q&A
Replies: 2 comments 3 replies
-
If anyone lands here from Google, I just dug through the source code and found an event called In plain JS: datepickerElement.addEventListener('changeDate', (e) => {
console.log(e.target.value);
}); Or as the original question is in jQuery: $('#startDate').on('changeDate', function(){
console.log(e.target.value);
}); |
Beta Was this translation helpful? Give feedback.
3 replies
-
I have added a 'changeDate' event listener to both inputs, and it is working properly. document.querySelector('input[name=startDateFilter]').addEventListener('changeDate', (e) => {
console.log('start date is: ' + e.target.value);
});
document.querySelector('input[name=endDateFilter]').addEventListener('changeDate', (e) => {
console.log('end date is: ' + e.target.value);
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
how can i detect the change on datepicker?
tried using this:
but it doesnt work.
the html code looks like this:
Beta Was this translation helpful? Give feedback.
All reactions