javascript - Setting defaults for JQuery UI datepicker on whole site -


i'm working site jquery ui datepicker displayed on lot of different pages. have set of features we'd date picker use pages - same date format, same icon, etc.

what's best way set these items default datepicker() function, rather have every call datepicker() include same options? i'm thinking of either somehow modify properties of datepicker() function or create our own function wraps dataepicker() , sets defaults.

you can use $.datepicker.setdefaults() once in file included on every page (if have main .js of sort example) runs before .datepicker() calls, example:

$.datepicker.setdefaults({ dateformat: 'yyyy-mm-dd' })  

the options passed in .datepicker() call.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -