Pre-loading defaults?
Closed this issue · 1 comments
sunnywalker commented
Is there a way to pre-load defaults rather than passing them in the options?
For example, with jQueryUI, one can call this before calling the datepicker:
jQuery.datepicker.setDefaults({
showButtonPanel:true,
changeMonth:true,
changeYear:true,
showOn:'button',
buttonImage:'calendar.png',
buttonImageOnly:true
});
$('.selector').datepicker();
$('.another').datepicker({changeYear:false});
I'd like to do something similar with zdatepicker, and trying this didn't work:
$.fn.zdatepicker.defaults.format.date = 'mm/dd/yyyy';
$('.selector').zdatepicker();
This way I can have an include file which loads the zdatepicker assets and sets up some global defaults, rather than having to define every option every time.
page7 commented
I fixed it in v3.2.0 too ~~~
Thank you ~~