I have the following form:
<form class="uk-form">
<label for="startDate">Start Date:</label>
<input type="text" id="startDate" data-uk-datepicker="{format:'YYYY-MM-DD'}">
<label for="endDate">End Date:</label>
<input type="text" id="endDate" data-uk-datepicker="{format:'YYYY-MM-DD'}">
</form>
What I need is to call a JS function once one of those datapicker gets changed using .on() in JQuery.
I get it to work using only one with this code:
$('#startDate').on('change', function() {
However what I need is that when one of them changes to run the function, sort of like this:
$('#startDate'||'#endDate' ).on('change', function() {
Any ideas?