diff --git a/src/components/calendar/Calendar.vue b/src/components/calendar/Calendar.vue index dc4cec1a5..5986561ab 100644 --- a/src/components/calendar/Calendar.vue +++ b/src/components/calendar/Calendar.vue @@ -43,6 +43,10 @@ +
+ + +
@@ -730,7 +734,6 @@ export default { } return output; }, - formatTime(date) { if (!date) { return ''; @@ -764,6 +767,27 @@ export default { } return output; + }, + onTodayButtonClick(event) { + let date = new Date(); + let dateMeta = { + day: date.getDate(), + month: date.getMonth(), + year: date.getFullYear(), + otherMonth: date.getMonth() !== this.currentMonth || date.getFullYear() !== this.currentYear, + today: true, + selectable: true + }; + + this.onDateSelect(dateMeta); + this.$emit('click-today', date); + this.onTodayClick.emit(event); + event.preventDefault(); + }, + onClearButtonClick(event) { + this.updateModel(null); + this.overlayVisible = false; + this.$emit('click-clear'); } }, computed: {