diff --git a/src/vuetify-week-scheduler.vue b/src/vuetify-week-scheduler.vue index a88f546..1cb7ab9 100644 --- a/src/vuetify-week-scheduler.vue +++ b/src/vuetify-week-scheduler.vue @@ -72,6 +72,15 @@ > mdi-content-copy + + mdi-select-all + @@ -223,6 +232,7 @@ export default { periodTextColor: "#000", periodRemoveButton: "Remove", periodDuplicateButton: "Duplicate", + periodSelectWholeButton: "Select whole day", inputType: "text", daysList: [ "Monday", @@ -727,6 +737,27 @@ export default { return y; }, + selectWholeDay(day) { + if (this.data[day]) { + const { periods } = this.data[day]; + if (periods.length > 0) { + periods[0].start = "00:00"; + periods[0].end = "24:00"; + this.data[day].periods = [periods[0]]; + } else { + this.data[day].periods = [ + { + start: "00:00", + end: "24:00", + title: this.settings.periodTitle, + backgroundColor: this.settings.periodBackgroundColor, + borderColor: this.settings.periodBorderColor, + textColor: this.settings.periodTextColor, + }, + ]; + } + } + }, }, };