|
@@ -1,100 +1,99 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <div style="
|
|
|
|
- border: 1px solid #cccccc;
|
|
|
|
- padding: 0px 0px 0px 0px;
|
|
|
|
- margin: 0px 0px 0px 0px;
|
|
|
|
- width: 1200px;
|
|
|
|
- overflow: visible;">
|
|
|
|
- <span style="margin-left:10px;margin-right:10px;">📅</span>
|
|
|
|
- <select
|
|
|
|
- v-model="selectedView"
|
|
|
|
- class="view-select"
|
|
|
|
|
|
+ <div
|
|
|
|
+ style="
|
|
|
|
+ border: 1px solid #cccccc;
|
|
|
|
+ padding: 0px 0px 0px 0px;
|
|
|
|
+ margin: 0px 0px 0px 0px;
|
|
|
|
+ width: 1200px;
|
|
|
|
+ overflow: visible;
|
|
|
|
+ "
|
|
>
|
|
>
|
|
- <option
|
|
|
|
- v-for="view in viewOptions"
|
|
|
|
- :key="view.value"
|
|
|
|
- :value="view.value"
|
|
|
|
- >
|
|
|
|
- {{ view.title }}
|
|
|
|
- </option>
|
|
|
|
- </select>
|
|
|
|
- <div class="buttons">
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- @click="onClickTodayButton"
|
|
|
|
- >
|
|
|
|
- 今天
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-d-arrow-left"
|
|
|
|
- @click="onClickMoveButton(-1)"
|
|
|
|
- ></el-button>
|
|
|
|
- <span class="date-range">{{ dateRangeText }}</span>
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-d-arrow-right"
|
|
|
|
- @click="onClickMoveButton(1)"
|
|
|
|
- ></el-button>
|
|
|
|
|
|
+ <span style="margin-left: 10px; margin-right: 10px">📅</span>
|
|
|
|
+ <select v-model="selectedView" class="view-select">
|
|
|
|
+ <option
|
|
|
|
+ v-for="view in viewOptions"
|
|
|
|
+ :key="view.value"
|
|
|
|
+ :value="view.value"
|
|
|
|
+ >
|
|
|
|
+ {{ view.title }}
|
|
|
|
+ </option>
|
|
|
|
+ </select>
|
|
|
|
+ <div class="buttons">
|
|
|
|
+ <el-button type="text" @click="onClickTodayButton"> 今天 </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-d-arrow-left"
|
|
|
|
+ @click="onClickMoveButton(-1)"
|
|
|
|
+ ></el-button>
|
|
|
|
+ <span class="date-range">{{ dateRangeText }}</span>
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-d-arrow-right"
|
|
|
|
+ @click="onClickMoveButton(1)"
|
|
|
|
+ ></el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <ToastUICalendar
|
|
|
|
+ ref="calendar"
|
|
|
|
+ style="height: 550px"
|
|
|
|
+ :view="'month'"
|
|
|
|
+ :use-form-popup="true"
|
|
|
|
+ :use-detail-popup="true"
|
|
|
|
+ :week="uioption.week"
|
|
|
|
+ :month="uioption.month"
|
|
|
|
+ :timezone="{ zones }"
|
|
|
|
+ :theme="theme"
|
|
|
|
+ :template="{
|
|
|
|
+ xxmilestone: getTemplateForMilestone,
|
|
|
|
+ xxtask: getTemplateForTask,
|
|
|
|
+ xxallday: getTemplateForAllday,
|
|
|
|
+ xxtime: getTemplateForTime,
|
|
|
|
+ monthGridHeader: monthGridHeader,
|
|
|
|
+ monthMoreTitleDate: monthMoreTitleDate,
|
|
|
|
+ }"
|
|
|
|
+ :grid-selection="true"
|
|
|
|
+ :calendars="calendars"
|
|
|
|
+ :attendees="attendees"
|
|
|
|
+ :notices="notices"
|
|
|
|
+ :events="events"
|
|
|
|
+ @customFormPopup="onCustomFormPopup"
|
|
|
|
+ @selectDateTime="onSelectDateTime"
|
|
|
|
+ @beforeCreateEvent="onBeforeCreateEvent"
|
|
|
|
+ @beforeUpdateEvent="onBeforeUpdateEvent"
|
|
|
|
+ @beforeDeleteEvent="onBeforeDeleteEvent"
|
|
|
|
+ @afterRenderEvent="onAfterRenderEvent"
|
|
|
|
+ @clickDayName="onClickDayName"
|
|
|
|
+ @clickEvent="onClickEvent"
|
|
|
|
+ @clickTimezonesCollapseBtn="onClickTimezonesCollapseBtn"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
- <ToastUICalendar
|
|
|
|
- ref="calendar"
|
|
|
|
- style="height:550px;"
|
|
|
|
- :view="'month'"
|
|
|
|
- :use-form-popup="true"
|
|
|
|
- :use-detail-popup="true"
|
|
|
|
- :week="uioption.week"
|
|
|
|
- :month="uioption.month"
|
|
|
|
- :timezone="{ zones }"
|
|
|
|
- :theme="theme"
|
|
|
|
- :template="{
|
|
|
|
- xxmilestone: getTemplateForMilestone,
|
|
|
|
- xxtask: getTemplateForTask,
|
|
|
|
- xxallday: getTemplateForAllday,
|
|
|
|
- xxtime: getTemplateForTime,
|
|
|
|
- monthGridHeader: monthGridHeader,
|
|
|
|
- monthMoreTitleDate: monthMoreTitleDate,
|
|
|
|
- }"
|
|
|
|
- :grid-selection="true"
|
|
|
|
- :calendars="calendars"
|
|
|
|
- :attendees="attendees"
|
|
|
|
- :notices="notices"
|
|
|
|
- :events="events"
|
|
|
|
- @selectDateTime="onSelectDateTime"
|
|
|
|
- @beforeCreateEvent="onBeforeCreateEvent"
|
|
|
|
- @beforeUpdateEvent="onBeforeUpdateEvent"
|
|
|
|
- @beforeDeleteEvent="onBeforeDeleteEvent"
|
|
|
|
- @afterRenderEvent="onAfterRenderEvent"
|
|
|
|
- @clickDayName="onClickDayName"
|
|
|
|
- @clickEvent="onClickEvent"
|
|
|
|
- @clickTimezonesCollapseBtn="onClickTimezonesCollapseBtn"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <EventForm ref="eventform" style="visibility:hidden;"></EventForm>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
/* eslint-disable no-console */
|
|
/* eslint-disable no-console */
|
|
-import ToastUICalendar from './Calendar.js';
|
|
|
|
-import './tuical/toastui-calendar.css';
|
|
|
|
-import 'tui-date-picker/dist/tui-date-picker.min.css';
|
|
|
|
-import 'tui-time-picker/dist/tui-time-picker.min.css';
|
|
|
|
|
|
+import ToastUICalendar from "./Calendar.js";
|
|
|
|
+import "./tuical/toastui-calendar.css";
|
|
|
|
+import "tui-date-picker/dist/tui-date-picker.min.css";
|
|
|
|
+import "tui-time-picker/dist/tui-time-picker.min.css";
|
|
|
|
|
|
-import { events, calendars } from './mock-data';
|
|
|
|
-import { theme } from './theme';
|
|
|
|
-import './calendar.css';
|
|
|
|
|
|
+import { events, calendars } from "./mock-data";
|
|
|
|
+import { theme } from "./theme";
|
|
|
|
+import "./calendar.css";
|
|
|
|
|
|
-import { lunar } from './lunar/lunar';
|
|
|
|
|
|
+import { lunar } from "./lunar/lunar";
|
|
|
|
+import EventForm from "./EventForm.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
ToastUICalendar,
|
|
ToastUICalendar,
|
|
|
|
+ EventForm,
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
attendees: {
|
|
attendees: {
|
|
type: Array,
|
|
type: Array,
|
|
- default: () => ['*'],
|
|
|
|
|
|
+ default: () => ["*"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -103,31 +102,31 @@ export default {
|
|
notices: [
|
|
notices: [
|
|
{
|
|
{
|
|
id: "n1",
|
|
id: "n1",
|
|
- name: "notice1"
|
|
|
|
|
|
+ name: "notice1",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: "n2",
|
|
id: "n2",
|
|
- name: "notice2"
|
|
|
|
|
|
+ name: "notice2",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
events,
|
|
events,
|
|
zones: [
|
|
zones: [
|
|
{
|
|
{
|
|
- timezoneName: 'Asia/Shanghai',
|
|
|
|
- displayLabel: 'Beijing',
|
|
|
|
- tooltip: 'UTC+08:00',
|
|
|
|
|
|
+ timezoneName: "Asia/Shanghai",
|
|
|
|
+ displayLabel: "Beijing",
|
|
|
|
+ tooltip: "UTC+08:00",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
theme,
|
|
theme,
|
|
- selectedView: 'month',
|
|
|
|
|
|
+ selectedView: "month",
|
|
viewOptions: [
|
|
viewOptions: [
|
|
{
|
|
{
|
|
- title: '月',
|
|
|
|
- value: 'month',
|
|
|
|
|
|
+ title: "月",
|
|
|
|
+ value: "month",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '周',
|
|
|
|
- value: 'week',
|
|
|
|
|
|
+ title: "周",
|
|
|
|
+ value: "week",
|
|
},
|
|
},
|
|
// {
|
|
// {
|
|
// title: '天',
|
|
// title: '天',
|
|
@@ -136,18 +135,26 @@ export default {
|
|
],
|
|
],
|
|
uioption: {
|
|
uioption: {
|
|
month: {
|
|
month: {
|
|
- dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
|
|
|
|
|
+ dayNames: [
|
|
|
|
+ "星期日",
|
|
|
|
+ "星期一",
|
|
|
|
+ "星期二",
|
|
|
|
+ "星期三",
|
|
|
|
+ "星期四",
|
|
|
|
+ "星期五",
|
|
|
|
+ "星期六",
|
|
|
|
+ ],
|
|
startDayOfWeek: 1,
|
|
startDayOfWeek: 1,
|
|
},
|
|
},
|
|
week: {
|
|
week: {
|
|
- dayNames: ['日', '一', '二', '三', '四', '五', '六'],
|
|
|
|
|
|
+ dayNames: ["日", "一", "二", "三", "四", "五", "六"],
|
|
showTimezoneCollapseButton: true,
|
|
showTimezoneCollapseButton: true,
|
|
timezonesCollapsed: false,
|
|
timezonesCollapsed: false,
|
|
eventView: true,
|
|
eventView: true,
|
|
taskView: true,
|
|
taskView: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- dateRangeText: '',
|
|
|
|
|
|
+ dateRangeText: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -165,22 +172,28 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
-
|
|
|
|
- m3.callFS("/matrix/calendar/load.js").then( (res)=>{
|
|
|
|
- //console.log(res)
|
|
|
|
- if (res.status == "ok" && res.message && res.message.data && res.message.data.length > 0) {
|
|
|
|
- var cals = [];
|
|
|
|
- for(var i in calendars) {
|
|
|
|
- cals.push(calendars[i]);
|
|
|
|
- }
|
|
|
|
- for(var i in res.message.calendars) {
|
|
|
|
- cals.push(res.message.calendars[i]);
|
|
|
|
|
|
+ m3.callFS("/matrix/calendar/load.js")
|
|
|
|
+ .then((res) => {
|
|
|
|
+ //console.log(res)
|
|
|
|
+ if (
|
|
|
|
+ res.status == "ok" &&
|
|
|
|
+ res.message &&
|
|
|
|
+ res.message.data &&
|
|
|
|
+ res.message.data.length > 0
|
|
|
|
+ ) {
|
|
|
|
+ var cals = [];
|
|
|
|
+ for (var i in calendars) {
|
|
|
|
+ cals.push(calendars[i]);
|
|
|
|
+ }
|
|
|
|
+ for (var i in res.message.calendars) {
|
|
|
|
+ cals.push(res.message.calendars[i]);
|
|
|
|
+ }
|
|
|
|
+ this.calendarInstance.setCalendars(cals);
|
|
}
|
|
}
|
|
- this.calendarInstance.setCalendars(cals);
|
|
|
|
- }
|
|
|
|
- }).catch( (err)=>{
|
|
|
|
- console.error(err);
|
|
|
|
- } );
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
|
|
this.setDateRangeText();
|
|
this.setDateRangeText();
|
|
},
|
|
},
|
|
@@ -198,42 +211,66 @@ export default {
|
|
return `[T] ${event.title}`;
|
|
return `[T] ${event.title}`;
|
|
},
|
|
},
|
|
monthGridHeader(model) {
|
|
monthGridHeader(model) {
|
|
- const year = parseInt(model.date.split('-')[0], 10);
|
|
|
|
- const month = parseInt(model.date.split('-')[1], 10);
|
|
|
|
- const date = parseInt(model.date.split('-')[2], 10);
|
|
|
|
- const ld = lunar.solar2lunar(year,month,date)
|
|
|
|
- const ldate = ld.lDay==1? ld.IMonthCn : ld.IDayCn;
|
|
|
|
|
|
+ const year = parseInt(model.date.split("-")[0], 10);
|
|
|
|
+ const month = parseInt(model.date.split("-")[1], 10);
|
|
|
|
+ const date = parseInt(model.date.split("-")[2], 10);
|
|
|
|
+ const ld = lunar.solar2lunar(year, month, date);
|
|
|
|
+ const ldate = ld.lDay == 1 ? ld.IMonthCn : ld.IDayCn;
|
|
var cls = "toastui-calendar-weekday-grid-date";
|
|
var cls = "toastui-calendar-weekday-grid-date";
|
|
- if(model.isToday){
|
|
|
|
|
|
+ if (model.isToday) {
|
|
cls += " toastui-calendar-weekday-grid-date-decorator";
|
|
cls += " toastui-calendar-weekday-grid-date-decorator";
|
|
}
|
|
}
|
|
cls += " toastui-calendar-template-monthGridHeader";
|
|
cls += " toastui-calendar-template-monthGridHeader";
|
|
- return `<span class="${cls}">${date}</span><span>【${ldate}】</span>`
|
|
|
|
|
|
+ return `<span class="${cls}">${date}</span><span>【${ldate}】</span>`;
|
|
},
|
|
},
|
|
monthMoreTitleDate(moreTitle) {
|
|
monthMoreTitleDate(moreTitle) {
|
|
const { ymd } = moreTitle;
|
|
const { ymd } = moreTitle;
|
|
- const year = parseInt(ymd.split('-')[0], 10);
|
|
|
|
- const month = parseInt(ymd.split('-')[1], 10);
|
|
|
|
- const date = parseInt(ymd.split('-')[2], 10);
|
|
|
|
- const ld = lunar.solar2lunar(year,month,date);
|
|
|
|
|
|
+ const year = parseInt(ymd.split("-")[0], 10);
|
|
|
|
+ const month = parseInt(ymd.split("-")[1], 10);
|
|
|
|
+ const date = parseInt(ymd.split("-")[2], 10);
|
|
|
|
+ const ld = lunar.solar2lunar(year, month, date);
|
|
const cls = "toastui-calendar-more-title-date";
|
|
const cls = "toastui-calendar-more-title-date";
|
|
- return `<span class="${cls}">${month}月${date}日</span><span>【${ld.IMonthCn}${ld.IDayCn}】${ld.ncWeek}</span>`
|
|
|
|
|
|
+ return `<span class="${cls}">${month}月${date}日</span><span>【${ld.IMonthCn}${ld.IDayCn}】${ld.ncWeek}</span>`;
|
|
|
|
+ },
|
|
|
|
+ onCustomFormPopup(eventData) {
|
|
|
|
+ eventData.CustomEventForm = true;
|
|
|
|
+
|
|
|
|
+ const event = {
|
|
|
|
+ calendarId: eventData.calendarId || "",
|
|
|
|
+ id: eventData.id || String(Math.random()),
|
|
|
|
+ title: eventData.title,
|
|
|
|
+ isAllday: eventData.isAllday,
|
|
|
|
+ start: eventData.start,
|
|
|
|
+ end: eventData.end,
|
|
|
|
+ category: eventData.category,
|
|
|
|
+ dueDateClass: "",
|
|
|
|
+ location: eventData.location,
|
|
|
|
+ state: eventData.state,
|
|
|
|
+ isPrivate: eventData.isPrivate,
|
|
|
|
+ body: eventData.body,
|
|
|
|
+ attendees: eventData.attendees,
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ this.$refs["eventform"].event = event;
|
|
|
|
+ this.$refs["eventform"].show();
|
|
|
|
+
|
|
|
|
+ eventData.Submit = event;
|
|
},
|
|
},
|
|
onSelectDateTime({ start, end }) {
|
|
onSelectDateTime({ start, end }) {
|
|
- console.group('onSelectDateTime');
|
|
|
|
|
|
+ console.group("onSelectDateTime");
|
|
console.log(`Date : ${start} ~ ${end}`);
|
|
console.log(`Date : ${start} ~ ${end}`);
|
|
console.groupEnd();
|
|
console.groupEnd();
|
|
},
|
|
},
|
|
onBeforeCreateEvent(eventData) {
|
|
onBeforeCreateEvent(eventData) {
|
|
const event = {
|
|
const event = {
|
|
- calendarId: eventData.calendarId || '',
|
|
|
|
|
|
+ calendarId: eventData.calendarId || "",
|
|
id: String(Math.random()),
|
|
id: String(Math.random()),
|
|
title: eventData.title,
|
|
title: eventData.title,
|
|
isAllday: eventData.isAllday,
|
|
isAllday: eventData.isAllday,
|
|
start: eventData.start,
|
|
start: eventData.start,
|
|
end: eventData.end,
|
|
end: eventData.end,
|
|
category: eventData.category,
|
|
category: eventData.category,
|
|
- dueDateClass: '',
|
|
|
|
|
|
+ dueDateClass: "",
|
|
location: eventData.location,
|
|
location: eventData.location,
|
|
state: eventData.state,
|
|
state: eventData.state,
|
|
isPrivate: eventData.isPrivate,
|
|
isPrivate: eventData.isPrivate,
|
|
@@ -244,47 +281,51 @@ export default {
|
|
this.calendarInstance.createEvents([event]);
|
|
this.calendarInstance.createEvents([event]);
|
|
},
|
|
},
|
|
onBeforeUpdateEvent(updateData) {
|
|
onBeforeUpdateEvent(updateData) {
|
|
- console.group('onBeforeUpdateEvent');
|
|
|
|
|
|
+ console.group("onBeforeUpdateEvent");
|
|
console.log(updateData);
|
|
console.log(updateData);
|
|
console.groupEnd();
|
|
console.groupEnd();
|
|
|
|
|
|
const targetEvent = updateData.event;
|
|
const targetEvent = updateData.event;
|
|
const changes = { ...updateData.changes };
|
|
const changes = { ...updateData.changes };
|
|
-
|
|
|
|
- this.calendarInstance.updateEvent(targetEvent.id, targetEvent.calendarId, changes);
|
|
|
|
|
|
+
|
|
|
|
+ this.calendarInstance.updateEvent(
|
|
|
|
+ targetEvent.id,
|
|
|
|
+ targetEvent.calendarId,
|
|
|
|
+ changes
|
|
|
|
+ );
|
|
},
|
|
},
|
|
|
|
|
|
onBeforeDeleteEvent({ title, id, calendarId }) {
|
|
onBeforeDeleteEvent({ title, id, calendarId }) {
|
|
- console.group('onBeforeDeleteEvent');
|
|
|
|
- console.log('Event Info : ', title);
|
|
|
|
|
|
+ console.group("onBeforeDeleteEvent");
|
|
|
|
+ console.log("Event Info : ", title);
|
|
console.groupEnd();
|
|
console.groupEnd();
|
|
|
|
|
|
this.calendarInstance.deleteEvent(id, calendarId);
|
|
this.calendarInstance.deleteEvent(id, calendarId);
|
|
},
|
|
},
|
|
onAfterRenderEvent({ title }) {
|
|
onAfterRenderEvent({ title }) {
|
|
- console.group('onAfterRenderEvent');
|
|
|
|
- console.log('Event Info : ', title);
|
|
|
|
|
|
+ console.group("onAfterRenderEvent");
|
|
|
|
+ console.log("Event Info : ", title);
|
|
console.groupEnd();
|
|
console.groupEnd();
|
|
},
|
|
},
|
|
onClickDayName({ date }) {
|
|
onClickDayName({ date }) {
|
|
- console.group('onClickDayName');
|
|
|
|
- console.log('Date : ', date);
|
|
|
|
|
|
+ console.group("onClickDayName");
|
|
|
|
+ console.log("Date : ", date);
|
|
console.groupEnd();
|
|
console.groupEnd();
|
|
},
|
|
},
|
|
onClickEvent({ nativeEvent, event }) {
|
|
onClickEvent({ nativeEvent, event }) {
|
|
- console.group('onClickEvent');
|
|
|
|
- console.log('MouseEvent : ', nativeEvent);
|
|
|
|
- console.log('Event Info : ', event);
|
|
|
|
|
|
+ console.group("onClickEvent");
|
|
|
|
+ console.log("MouseEvent : ", nativeEvent);
|
|
|
|
+ console.log("Event Info : ", event);
|
|
console.groupEnd();
|
|
console.groupEnd();
|
|
},
|
|
},
|
|
onClickTimezonesCollapseBtn(timezoneCollapsed) {
|
|
onClickTimezonesCollapseBtn(timezoneCollapsed) {
|
|
- console.group('onClickTimezonesCollapseBtn');
|
|
|
|
- console.log('Is Timezone Collapsed?: ', timezoneCollapsed);
|
|
|
|
|
|
+ console.group("onClickTimezonesCollapseBtn");
|
|
|
|
+ console.log("Is Timezone Collapsed?: ", timezoneCollapsed);
|
|
console.groupEnd();
|
|
console.groupEnd();
|
|
|
|
|
|
const newTheme = {
|
|
const newTheme = {
|
|
- 'week.daygridLeft.width': '100px',
|
|
|
|
- 'week.timegridLeft.width': '100px',
|
|
|
|
|
|
+ "week.daygridLeft.width": "100px",
|
|
|
|
+ "week.timegridLeft.width": "100px",
|
|
};
|
|
};
|
|
|
|
|
|
this.calendarInstance.setTheme(newTheme);
|
|
this.calendarInstance.setTheme(newTheme);
|
|
@@ -306,16 +347,22 @@ export default {
|
|
const endYear = end.getFullYear();
|
|
const endYear = end.getFullYear();
|
|
|
|
|
|
switch (this.selectedView) {
|
|
switch (this.selectedView) {
|
|
- case 'month':
|
|
|
|
- this.dateRangeText = `${date.getFullYear()}年${date.getMonth() + 1}月`;
|
|
|
|
|
|
+ case "month":
|
|
|
|
+ this.dateRangeText = `${date.getFullYear()}年${
|
|
|
|
+ date.getMonth() + 1
|
|
|
|
+ }月`;
|
|
|
|
|
|
return;
|
|
return;
|
|
- case 'day':
|
|
|
|
- this.dateRangeText = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`;
|
|
|
|
|
|
+ case "day":
|
|
|
|
+ this.dateRangeText = `${date.getFullYear()}年${
|
|
|
|
+ date.getMonth() + 1
|
|
|
|
+ }月${date.getDate()}日`;
|
|
return;
|
|
return;
|
|
default:
|
|
default:
|
|
- this.dateRangeText = `${startYear}年${start.getMonth() + 1}月${start.getDate()}日 - ${
|
|
|
|
- startYear !== endYear ? `${endYear}年` : ''
|
|
|
|
|
|
+ this.dateRangeText = `${startYear}年${
|
|
|
|
+ start.getMonth() + 1
|
|
|
|
+ }月${start.getDate()}日 - ${
|
|
|
|
+ startYear !== endYear ? `${endYear}年` : ""
|
|
}${end.getMonth() + 1}月${end.getDate()}日`;
|
|
}${end.getMonth() + 1}月${end.getDate()}日`;
|
|
}
|
|
}
|
|
},
|
|
},
|