picker.setEnabledDates = function (dates) {
                    picker.options.enabledDates = indexGivenDates(dates);
                    if (picker.viewDate) update();
                },