Say I have a #date field. First, I initialize it with some options (at the moment they are not important):
$('#date').datepicker(options);
Then, if I try to add the onClose function, I would do:
$('#date').datepicker({onClose: function(dateText, inst){console.log("Hello World");}});
Howerver, this overrides the parameters set previously. Let's say I do not have access to these parameters - the datepicker is initialized, the parameters are set, and now I need to add the onClose function. How to do it? I tried .datepicker('option','onClose',function(){}); no effect.
source share