We have a requirement to add some functionality implementation on change of one date picker custom field value and we need to achieve this through java script.
We have tried adding event listener to both the elements(both textbox and calendar icon) but it is not working. what is the event listener should be used and on which element to be used?
Hi @Sandesh TM
adding a simple change event lisneter on an input field would be something like the below code in javascript
AJS.$(function () {
AJS.$('#customfield_XXXXX').on('change', function () {
// what will you do when you got the change
console.log('Date changed:', AJS.$(this).val());
});
});
I don't know what have you tried and what error you've got. The more you clarify, the more we can help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.