When I am setting beforeShowDay after initializing it doesn't work
$("#dater").datepicker();
$("#dater").datepicker({
beforeShowDay: renderCalendarCallback
});
It will work when I will change and call beforeShowDay for first time
$("#dater").datepicker({
beforeShowDay: renderCalendarCallback
});
$("#dater").datepicker();
How can I fix this to call beforeShowDay in first scenario too? Note that I can't remove first initialization, because it is unreachable for me. You can test this scenarios in this jsfiddle http://jsfiddle.net/b6V3W/352/
For setting options after initialization, you need to use the option()
method.
$('#dater').datepicker( "option", "beforeShowDay", renderCalendarCallback );
Check Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With