Hi I have several date pickers all under the same class of .datepicker I have a function which executes onSelect of any of the date pickers. However I want to execute another function on selection of a specific date picker I've tried to do a separate date picker assignment to the specific one I want a separate function on but can't seem to get it to work
Original Datepicker Class
$(".datepicker").datepicker({
dateFormat: 'yy-mm-dd',
showButtonPanel: true,
onSelect: function (date_check) { }
})
My specific targeted date picker which also holds class of datepicker.
$("#myDate").datepicker({
dateFormat: 'yy-mm-dd',
showButtonPanel: true,
onSelect: function (date_assign) { }
})
My question is:
Is there a way I can target specific datepickers with the .datepicker class to perform a secondary onSelect function to that specific datepicker. Or is there a different way?
*NB The datepicker has to be able to perform both the original function under the .datepicker class and the new function.
UPDATE
<input class="datepicker" id="a"> </input>
<input class="datepicker" id="b"> </input>
<input class="datepicker" id="myDate"> </input>
On selection of a or b or myDate run the the original .datepicker onSelect function
On selection of specifically myDate run the original .datepicker onSelect and run a separate onSelect function.