日历
v-calendar
组件用于在每日、每周或每月视图中显示信息。每日视图有一个全天或定时元素的插槽,每周和每月视图有一个每天的插槽。您可以选择传入一个事件数组,它们将在适当的日期和时间内呈现。
用例
日历具有类型和值,该类型和值决定在多长时间内显示何种类型的日历。这显示了最简单的配置,一个带有 name
, start
和 end
属性的事件数组。 end
是可选的,它默认为 start
。如果 start
定义了时间,那么它被认为是一个定时事件,并将相应地显示在日视图中。事件可以跨越数天,并将相应地呈现。
template script
<template>
<div>
<v-sheet
tile
height="54"
color="grey lighten-3"
class="d-flex"
>
<v-btn
icon
class="ma-2"
@click="$refs.calendar.prev()"
>
<v-icon>mdi-chevron-left</v-icon>
</v-btn>
<v-select
v-model="type"
:items="types"
dense
outlined
hide-details
class="ma-2"
label="type"
></v-select>
<v-select
v-model="mode"
:items="modes"
dense
outlined
hide-details
label="event-overlap-mode"
class="ma-2"
></v-select>
<v-select
v-model="weekday"
:items="weekdays"
dense
outlined
hide-details
label="weekdays"
class="ma-2"
></v-select>
<v-spacer></v-spacer>
<v-btn
icon
class="ma-2"
@click="$refs.calendar.next()"
>
<v-icon>mdi-chevron-right</v-icon>
</v-btn>
</v-sheet>
<v-sheet height="600">
<v-calendar
ref="calendar"
v-model="value"
:weekdays="weekday"
:type="type"
:events="events"
:event-overlap-mode="mode"
:event-overlap-threshold="30"
:event-color="getEventColor"
@change="getEvents"
></v-calendar>
</v-sheet>
</div>
</template>
<script>
export default {
data: () => ({
type: 'month',
types: ['month', 'week', 'day', '4day'],
mode: 'stack',
modes: ['stack', 'column'],
weekday: [0, 1, 2, 3, 4, 5, 6],
weekdays: [
{ text: 'Sun - Sat', value: [0, 1, 2, 3, 4, 5, 6] },
{ text: 'Mon - Sun', value: [1, 2, 3, 4, 5, 6, 0] },
{ text: 'Mon - Fri', value: [1, 2, 3, 4, 5] },
{ text: 'Mon, Wed, Fri', value: [1, 3, 5] },
],
value: '',
events: [],
colors: ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey darken-1'],
names: ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party'],
}),
methods: {
getEvents ({ start, end }) {
const events = []
const min = new Date(`${start.date}T00:00:00`)
const max = new Date(`${end.date}T23:59:59`)
const days = (max.getTime() - min.getTime()) / 86400000
const eventCount = this.rnd(days, days + 20)
for (let i = 0; i < eventCount; i++) {
const allDay = this.rnd(0, 3) === 0
const firstTimestamp = this.rnd(min.getTime(), max.getTime())
const first = new Date(firstTimestamp - (firstTimestamp % 900000))
const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000
const second = new Date(first.getTime() + secondTimestamp)
events.push({
name: this.names[this.rnd(0, this.names.length - 1)],
start: this.formatDate(first, !allDay),
end: this.formatDate(second, !allDay),
color: this.colors[this.rnd(0, this.colors.length - 1)],
})
}
this.events = events
},
getEventColor (event) {
return event.color
},
rnd (a, b) {
return Math.floor((b - a + 1) * Math.random()) + a
},
formatDate (a, withTime) {
return withTime
? `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()} ${a.getHours()}:${a.getMinutes()}`
: `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()}`
},
},
}
</script>
API
从下面选择您想要的组件,并查看可用的属性、插槽、事件和函数。
实战场
template script style
<template>
<v-row>
<v-col
sm="12"
lg="3"
class="mb-4 controls"
>
<v-btn
fab
small
absolute
left
color="primary"
@click="$refs.calendar.prev()"
>
<v-icon dark>mdi-chevron-left</v-icon>
</v-btn>
<v-btn
fab
small
absolute
right
color="primary"
@click="$refs.calendar.next()"
>
<v-icon dark>mdi-chevron-right</v-icon>
</v-btn>
<br><br><br>
<v-select
v-model="type"
:items="typeOptions"
label="Type"
hide-details
outlined
dense
></v-select>
<v-checkbox
v-model="dark"
label="Dark"
hide-details
></v-checkbox>
<v-checkbox
v-model="shortIntervals"
label="Short intervals"
hide-details
></v-checkbox>
<v-checkbox
v-model="shortMonths"
label="Short months"
hide-details
></v-checkbox>
<v-checkbox
v-model="shortWeekdays"
label="Short weekdays"
hide-details
></v-checkbox>
<v-select
v-model="color"
:items="colorOptions"
class="mt-3"
label="Color"
hide-details
outlined
dense
></v-select>
<v-menu
ref="startMenu"
v-model="startMenu"
:close-on-content-click="false"
:nudge-right="40"
:return-value.sync="start"
transition="scale-transition"
min-width="290px"
offset-y
>
<template v-slot:activator="{ on }">
<v-text-field
v-model="start"
class="mt-3"
label="Start Date"
prepend-icon="event"
dense
readonly
outlined
hide-details
v-on="on"
></v-text-field>
</template>
<v-date-picker
v-model="start"
no-title
scrollable
>
<v-spacer></v-spacer>
<v-btn
text
color="primary"
@click="startMenu = false"
>
Cancel
</v-btn>
<v-btn
text
color="primary"
@click="$refs.startMenu.save(start)"
>
OK
</v-btn>
</v-date-picker>
</v-menu>
<v-menu
v-if="hasEnd"
ref="endMenu"
v-model="endMenu"
:close-on-content-click="false"
:nudge-right="40"
:return-value.sync="end"
transition="scale-transition"
min-width="290px"
offset-y
>
<template v-slot:activator="{ on }">
<v-text-field
v-model="end"
class="mt-3"
label="End Date"
prepend-icon="event"
dense
readonly
outlined
hide-details
v-on="on"
></v-text-field>
</template>
<v-date-picker
v-model="end"
no-title
scrollable
>
<v-spacer></v-spacer>
<v-btn
text
color="primary"
@click="endMenu = false"
>
Cancel
</v-btn>
<v-btn
text
color="primary"
@click="$refs.endMenu.save(end)"
>
OK
</v-btn>
</v-date-picker>
</v-menu>
<v-menu
ref="nowMenu"
v-model="nowMenu"
:close-on-content-click="false"
:nudge-right="40"
:return-value.sync="now"
transition="scale-transition"
min-width="290px"
offset-y
>
<template v-slot:activator="{ on }">
<v-text-field
v-model="now"
class="mt-3"
label="Today"
prepend-icon="event"
dense
readonly
outlined
hide-details
v-on="on"
></v-text-field>
</template>
<v-date-picker
v-model="now"
no-title
scrollable
>
<v-spacer></v-spacer>
<v-btn
text
color="primary"
@click="nowMenu = false"
>
Cancel
</v-btn>
<v-btn
text
color="primary"
@click="$refs.nowMenu.save(now)"
>
OK
</v-btn>
</v-date-picker>
</v-menu>
<v-select
v-model="mode"
:items="modeOptions"
dense
outlined
hide-details
class="mt-3"
label="Event Overlap Mode"
></v-select>
<v-select
v-model="weekdays"
:items="weekdaysOptions"
dense
outlined
hide-details
class="mt-3"
label="Weekdays"
></v-select>
<v-text-field
v-if="type === 'custom-weekly'"
v-model="minWeeks"
dense
outlined
hide-details
class="mt-3"
label="Minimum Weeks"
type="number"
></v-text-field>
<v-select
v-if="hasIntervals"
v-model="intervals"
:items="intervalsOptions"
dense
outlined
hide-details
class="mt-3"
label="Intervals"
></v-select>
<v-select
v-if="type === 'custom-daily'"
v-model="maxDays"
:items="maxDaysOptions"
dense
outlined
hide-details
class="mt-3"
label="# of Days"
></v-select>
<v-select
v-if="hasIntervals"
v-model="styleInterval"
:items="styleIntervalOptions"
dense
outlined
hide-details
class="mt-3"
label="Styling"
></v-select>
</v-col>
<v-col
sm="12"
lg="9"
class="pl-4"
>
<v-sheet height="600">
<v-calendar
ref="calendar"
v-model="start"
:type="type"
:start="start"
:end="end"
:min-weeks="minWeeks"
:max-days="maxDays"
:now="now"
:dark="dark"
:weekdays="weekdays"
:first-interval="intervals.first"
:interval-minutes="intervals.minutes"
:interval-count="intervals.count"
:interval-height="intervals.height"
:interval-style="intervalStyle"
:show-interval-label="showIntervalLabel"
:short-intervals="shortIntervals"
:short-months="shortMonths"
:short-weekdays="shortWeekdays"
:color="color"
:events="events"
:event-overlap-mode="mode"
:event-overlap-threshold="45"
:event-color="getEventColor"
@change="getEvents"
></v-calendar>
</v-sheet>
</v-col>
</v-row>
</template>
<script>
const weekdaysDefault = [0, 1, 2, 3, 4, 5, 6]
const intervalsDefault = {
first: 0,
minutes: 60,
count: 24,
height: 48,
}
const stylings = {
default (interval) {
return undefined
},
workday (interval) {
const inactive = interval.weekday === 0 ||
interval.weekday === 6 ||
interval.hour < 9 ||
interval.hour >= 17
const startOfHour = interval.minute === 0
const dark = this.dark
const mid = dark ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)'
return {
backgroundColor: inactive ? (dark ? 'rgba(0,0,0,0.4)' : 'rgba(0,0,0,0.05)') : undefined,
borderTop: startOfHour ? undefined : '1px dashed ' + mid,
}
},
past (interval) {
return {
backgroundColor: interval.past ? (this.dark ? 'rgba(0,0,0,0.4)' : 'rgba(0,0,0,0.05)') : undefined,
}
},
}
export default {
data: () => ({
dark: false,
startMenu: false,
start: '2019-01-12',
endMenu: false,
end: '2019-01-27',
nowMenu: false,
minWeeks: 1,
now: null,
events: [],
colors: ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey darken-1'],
names: ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party'],
type: 'month',
typeOptions: [
{ text: 'Day', value: 'day' },
{ text: '4 Day', value: '4day' },
{ text: 'Week', value: 'week' },
{ text: 'Month', value: 'month' },
{ text: 'Custom Daily', value: 'custom-daily' },
{ text: 'Custom Weekly', value: 'custom-weekly' },
],
mode: 'stack',
modeOptions: [
{ text: 'Stack', value: 'stack' },
{ text: 'Column', value: 'column' },
],
weekdays: weekdaysDefault,
weekdaysOptions: [
{ text: 'Sunday - Saturday', value: weekdaysDefault },
{ text: 'Mon, Wed, Fri', value: [1, 3, 5] },
{ text: 'Mon - Fri', value: [1, 2, 3, 4, 5] },
{ text: 'Mon - Sun', value: [1, 2, 3, 4, 5, 6, 0] },
],
intervals: intervalsDefault,
intervalsOptions: [
{ text: 'Default', value: intervalsDefault },
{ text: 'Workday', value: { first: 16, minutes: 30, count: 20, height: 48 } },
],
maxDays: 7,
maxDaysOptions: [
{ text: '7 days', value: 7 },
{ text: '5 days', value: 5 },
{ text: '4 days', value: 4 },
{ text: '3 days', value: 3 },
],
styleInterval: 'default',
styleIntervalOptions: [
{ text: 'Default', value: 'default' },
{ text: 'Workday', value: 'workday' },
{ text: 'Past', value: 'past' },
],
color: 'primary',
colorOptions: [
{ text: 'Primary', value: 'primary' },
{ text: 'Secondary', value: 'secondary' },
{ text: 'Accent', value: 'accent' },
{ text: 'Red', value: 'red' },
{ text: 'Pink', value: 'pink' },
{ text: 'Purple', value: 'purple' },
{ text: 'Deep Purple', value: 'deep-purple' },
{ text: 'Indigo', value: 'indigo' },
{ text: 'Blue', value: 'blue' },
{ text: 'Light Blue', value: 'light-blue' },
{ text: 'Cyan', value: 'cyan' },
{ text: 'Teal', value: 'teal' },
{ text: 'Green', value: 'green' },
{ text: 'Light Green', value: 'light-green' },
{ text: 'Lime', value: 'lime' },
{ text: 'Yellow', value: 'yellow' },
{ text: 'Amber', value: 'amber' },
{ text: 'Orange', value: 'orange' },
{ text: 'Deep Orange', value: 'deep-orange' },
{ text: 'Brown', value: 'brown' },
{ text: 'Blue Gray', value: 'blue-gray' },
{ text: 'Gray', value: 'gray' },
{ text: 'Black', value: 'black' },
],
shortIntervals: true,
shortMonths: false,
shortWeekdays: false,
}),
computed: {
intervalStyle () {
return stylings[this.styleInterval].bind(this)
},
hasIntervals () {
return this.type in {
week: 1, day: 1, '4day': 1, 'custom-daily': 1,
}
},
hasEnd () {
return this.type in {
'custom-weekly': 1, 'custom-daily': 1,
}
},
},
methods: {
viewDay ({ date }) {
this.start = date
this.type = 'day'
},
getEventColor (event) {
return event.color
},
showIntervalLabel (interval) {
return interval.minute === 0
},
getEvents ({ start, end }) {
const events = []
const min = new Date(`${start.date}T00:00:00`)
const max = new Date(`${end.date}T23:59:59`)
const days = (max.getTime() - min.getTime()) / 86400000
const eventCount = this.rnd(days, days + 20)
for (let i = 0; i < eventCount; i++) {
const allDay = this.rnd(0, 3) === 0
const firstTimestamp = this.rnd(min.getTime(), max.getTime())
const first = new Date(firstTimestamp - (firstTimestamp % 900000))
const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000
const second = new Date(first.getTime() + secondTimestamp)
events.push({
name: this.names[this.rnd(0, this.names.length - 1)],
start: this.formatDate(first, !allDay),
end: this.formatDate(second, !allDay),
color: this.colors[this.rnd(0, this.colors.length - 1)],
})
}
this.events = events
},
rnd (a, b) {
return Math.floor((b - a + 1) * Math.random()) + a
},
formatDate (a, withTime) {
return withTime
? `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()} ${a.getHours()}:${a.getMinutes()}`
: `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()}`
},
},
}
</script>
<style scoped>
.controls {
position: relative;
}
</style>
示例
下面是一些简单到复杂的例子。
每周
这是一个事件日历示例,其中包含类型为 week
的全天事件和定时事件。
template script style
<template>
<v-row>
<v-col>
<v-sheet height="400">
<v-calendar
ref="calendar"
:now="today"
:value="today"
:events="events"
color="primary"
type="week"
></v-calendar>
</v-sheet>
</v-col>
</v-row>
</template>
<script>
export default {
data: () => ({
today: '2019-01-08',
events: [
{
name: 'Weekly Meeting',
start: '2019-01-07 09:00',
end: '2019-01-07 10:00',
},
{
name: 'Thomas\' Birthday',
start: '2019-01-10',
},
{
name: 'Mash Potatoes',
start: '2019-01-09 12:30',
end: '2019-01-09 15:30',
},
],
}),
mounted () {
this.$refs.calendar.scrollToTime('08:00')
},
}
</script>
<style scoped>
.my-event {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border-radius: 2px;
background-color: #1867c0;
color: #ffffff;
border: 1px solid #1867c0;
font-size: 12px;
padding: 3px;
cursor: pointer;
margin-bottom: 1px;
left: 4px;
margin-right: 8px;
position: relative;
}
.my-event.with-time {
position: absolute;
right: 4px;
margin-right: 0px;
}
</style>
每日
这是一个日历示例,每个间隔时段都有内容,类型为 day
。
template script
<template>
<v-row>
<v-col>
<v-sheet height="400">
<v-calendar
color="primary"
type="day"
>
<template v-slot:day-header="{ present }">
<template
v-if="present"
class="text-center"
>
Today
</template>
</template>
<template v-slot:interval="{ hour }">
<div
class="text-center"
>
{{ hour }} o'clock
</div>
</template>
</v-calendar>
</v-sheet>
</v-col>
</v-row>
</template>
<script>
export default {
data: () => ({}),
}
</script>
Parallax Free
This beautiful single page parallax is a great home page for any application.
ads by Vuetify
](https://parallax-theme-free.johnleider.com?ref=vuetifyjs.com)
插槽
插槽允许您定义每天的内容、每日视图的时间间隔和各种标签。
template script
<template>
<v-row>
<v-col>
<v-sheet height="500">
<v-calendar
:now="today"
:value="today"
color="primary"
>
<template v-slot:day="{ present, past, date }">
<v-row
class="fill-height"
>
<template v-if="past && tracked[date]">
<v-sheet
v-for="(percent, i) in tracked[date]"
:key="i"
:title="category[i]"
:color="colors[i]"
:width="`${percent}%`"
height="100%"
tile
></v-sheet>
</template>
</v-row>
</template>
</v-calendar>
</v-sheet>
</v-col>
</v-row>
</template>
<script>
export default {
data: () => ({
today: '2019-01-10',
tracked: {
'2019-01-09': [23, 45, 10],
'2019-01-08': [10],
'2019-01-07': [0, 78, 5],
'2019-01-06': [0, 0, 50],
'2019-01-05': [0, 10, 23],
'2019-01-04': [2, 90],
'2019-01-03': [10, 32],
'2019-01-02': [80, 10, 10],
'2019-01-01': [20, 25, 10],
},
colors: ['#1867c0', '#fb8c00', '#000000'],
category: ['Development', 'Meetings', 'Slacking'],
}),
}
</script>
事件
这是一个带有附加事件处理程序和控制日历显示的外部组件的计划器示例。
template script
<template>
<v-row class="fill-height">
<v-col>
<v-sheet height="64">
<v-toolbar flat color="white">
<v-btn outlined class="mr-4" color="grey darken-2" @click="setToday">
Today
</v-btn>
<v-btn fab text small color="grey darken-2" @click="prev">
<v-icon small>mdi-chevron-left</v-icon>
</v-btn>
<v-btn fab text small color="grey darken-2" @click="next">
<v-icon small>mdi-chevron-right</v-icon>
</v-btn>
<v-toolbar-title>{{ title }}</v-toolbar-title>
<v-spacer></v-spacer>
<v-menu bottom right>
<template v-slot:activator="{ on }">
<v-btn
outlined
color="grey darken-2"
v-on="on"
>
<span>{{ typeToLabel[type] }}</span>
<v-icon right>mdi-menu-down</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item @click="type = 'day'">
<v-list-item-title>Day</v-list-item-title>
</v-list-item>
<v-list-item @click="type = 'week'">
<v-list-item-title>Week</v-list-item-title>
</v-list-item>
<v-list-item @click="type = 'month'">
<v-list-item-title>Month</v-list-item-title>
</v-list-item>
<v-list-item @click="type = '4day'">
<v-list-item-title>4 days</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</v-toolbar>
</v-sheet>
<v-sheet height="600">
<v-calendar
ref="calendar"
v-model="focus"
color="primary"
:events="events"
:event-color="getEventColor"
:now="today"
:type="type"
@click:event="showEvent"
@click:more="viewDay"
@click:date="viewDay"
@change="updateRange"
></v-calendar>
<v-menu
v-model="selectedOpen"
:close-on-content-click="false"
:activator="selectedElement"
offset-x
>
<v-card
color="grey lighten-4"
min-width="350px"
flat
>
<v-toolbar
:color="selectedEvent.color"
dark
>
<v-btn icon>
<v-icon>mdi-pencil</v-icon>
</v-btn>
<v-toolbar-title v-html="selectedEvent.name"></v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>mdi-heart</v-icon>
</v-btn>
<v-btn icon>
<v-icon>mdi-dots-vertical</v-icon>
</v-btn>
</v-toolbar>
<v-card-text>
<span v-html="selectedEvent.details"></span>
</v-card-text>
<v-card-actions>
<v-btn
text
color="secondary"
@click="selectedOpen = false"
>
Cancel
</v-btn>
</v-card-actions>
</v-card>
</v-menu>
</v-sheet>
</v-col>
</v-row>
</template>
<script>
export default {
data: () => ({
focus: '',
type: 'month',
typeToLabel: {
month: 'Month',
week: 'Week',
day: 'Day',
'4day': '4 Days',
},
start: null,
end: null,
selectedEvent: {},
selectedElement: null,
selectedOpen: false,
events: [],
colors: ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey darken-1'],
names: ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party'],
}),
computed: {
title () {
const { start, end } = this
if (!start || !end) {
return ''
}
const startMonth = this.monthFormatter(start)
const endMonth = this.monthFormatter(end)
const suffixMonth = startMonth === endMonth ? '' : endMonth
const startYear = start.year
const endYear = end.year
const suffixYear = startYear === endYear ? '' : endYear
const startDay = start.day + this.nth(start.day)
const endDay = end.day + this.nth(end.day)
switch (this.type) {
case 'month':
return `${startMonth} ${startYear}`
case 'week':
case '4day':
return `${startMonth} ${startDay} ${startYear} - ${suffixMonth} ${endDay} ${suffixYear}`
case 'day':
return `${startMonth} ${startDay} ${startYear}`
}
return ''
},
monthFormatter () {
return this.$refs.calendar.getFormatter({
timeZone: 'UTC', month: 'long',
})
},
},
mounted () {
this.$refs.calendar.checkChange()
},
methods: {
viewDay ({ date }) {
this.focus = date
this.type = 'day'
},
getEventColor (event) {
return event.color
},
setToday () {
this.focus = this.today
},
prev () {
this.$refs.calendar.prev()
},
next () {
this.$refs.calendar.next()
},
showEvent ({ nativeEvent, event }) {
const open = () => {
this.selectedEvent = event
this.selectedElement = nativeEvent.target
setTimeout(() => this.selectedOpen = true, 10)
}
if (this.selectedOpen) {
this.selectedOpen = false
setTimeout(open, 10)
} else {
open()
}
nativeEvent.stopPropagation()
},
updateRange ({ start, end }) {
const events = []
const min = new Date(`${start.date}T00:00:00`)
const max = new Date(`${end.date}T23:59:59`)
const days = (max.getTime() - min.getTime()) / 86400000
const eventCount = this.rnd(days, days + 20)
for (let i = 0; i < eventCount; i++) {
const allDay = this.rnd(0, 3) === 0
const firstTimestamp = this.rnd(min.getTime(), max.getTime())
const first = new Date(firstTimestamp - (firstTimestamp % 900000))
const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000
const second = new Date(first.getTime() + secondTimestamp)
events.push({
name: this.names[this.rnd(0, this.names.length - 1)],
start: this.formatDate(first, !allDay),
end: this.formatDate(second, !allDay),
color: this.colors[this.rnd(0, this.colors.length - 1)],
})
}
this.start = start
this.end = end
this.events = events
},
nth (d) {
return d > 3 && d < 21
? 'th'
: ['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'][d % 10]
},
rnd (a, b) {
return Math.floor((b - a + 1) * Math.random()) + a
},
formatDate (a, withTime) {
return withTime
? `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()} ${a.getHours()}:${a.getMinutes()}`
: `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()}`
},
},
}
</script>