Skip to content

Commit

Permalink
Syntax improvements, functional improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
MadMikeyB committed Dec 7, 2018
1 parent ff9852f commit 82374df
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/FunctionalCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,19 +384,22 @@
classNames.push('wh_isMark_disabled');
}
// Disable days of week if set in configuration
let dayOfWeekString = this.fConfigs.dayNames[new Date(item.date).getDay()];
if (this.fConfigs.disabledDayNames.includes(dayOfWeekString)) {
classNames.push('cursor-disallowed');
classNames.push('wh_other_dayhide');
}
return classNames;
},
clickDay: function (item) {
// Disable days of week if set in configuration
let dayOfWeek = new Date(item.date).getDay();
let dayOfWeekString = this.fConfigs.dayNames[dayOfWeek];
let dayOfWeekString = this.fConfigs.dayNames[new Date(item.date).getDay()];
if (this.fConfigs.disabledDayNames.includes(dayOfWeekString)) {
this.$emit('disabledDayClicked', {
'dayOfWeekString': dayOfWeekString,
'dayOfWeek': dayOfWeek,
});
return false;
}
Expand Down

0 comments on commit 82374df

Please sign in to comment.