Skip to content

Commit 5ef2c23

Browse files
authored
fix(calendar): disabled week days should not affect month and year view
When the disabledDaysOfWeek setting is used for the calendar module, this messed up the month or year selection
1 parent f41016e commit 5ef2c23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/definitions/modules/calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ $.fn.calendar = function(parameters) {
972972

973973
helper: {
974974
isDisabled: function(date, mode) {
975-
return (mode === 'day' || mode === 'month' || mode === 'year') && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
975+
return (mode === 'day' || mode === 'month' || mode === 'year') && ((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
976976
if(typeof d === 'string') {
977977
d = module.helper.sanitiseDate(d);
978978
}

0 commit comments

Comments
 (0)