Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Event listener for Date picker custom field

Sandesh TM
Contributor
March 18, 2025

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?

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2025

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

Suggest an answer

Log in or Sign up to answer