kbwood / calendars

jQuery World Calendars Plugin
88 stars 50 forks source link

Calendars validation regionalOptions can not be overridden #27

Closed a-mawlawi closed 6 years ago

a-mawlawi commented 6 years ago

I'm trying to override regional options for jquery.calendars.validation.js but this is not possible.

kbwood commented 6 years ago

You need to set these values through the calendarsPicker.setDefaults call, before applying the date picker to an element. E.g.:

$.calendarsPicker.setDefaults({validateDate: 'Wrong date'});
var islamic = $.calendars.instance('islamic');
$('#date').calendarsPicker({calendar: islamic, ... });
a-mawlawi commented 6 years ago

Thanks, this is working