kubal5003 kubal5003 - 3 months ago 5x
jQuery Question

jQuery - how to alter Datepicker settings after it has been initialized

I would like to bind to initialized datepicker "onSelect" function.

I've been trying hard to find a solution on the web, but was unsuccessful.

Anyone can tell me how to do it?


You can simply use the setter

$('#datepicker').datepicker("option", "onSelect", function(){alert('hi')});

fiddle here http://jsfiddle.net/nhmsZ/