4343</template >
4444
4545<script >
46- import idate from ' ../../date' ;
46+ import dayjs from ' ../../date' ;
4747
4848import VuecMonth from ' ./month.vue' ;
4949import DefaultDayView from ' ./default-day.vue' ;
@@ -75,7 +75,7 @@ export default {
7575 },
7676 date: {
7777 type: Object ,
78- default : () => idate (),
78+ default : () => dayjs (),
7979 },
8080 visibleMonths: {
8181 type: Number ,
@@ -116,7 +116,7 @@ export default {
116116 const map = {};
117117
118118 this .selections .forEach ((item ) => {
119- const month = idate (item, ' YYYY/MM/DD' ).format (' YYYY/MM' );
119+ const month = dayjs (item, ' YYYY/MM/DD' ).format (' YYYY/MM' );
120120 map[month] = map[month] || [];
121121 map[month].push (item);
122122 return map;
@@ -127,20 +127,20 @@ export default {
127127 months () {
128128 const months = [];
129129
130- let date = idate (this .Xdate );
130+ let date = dayjs (this .Xdate );
131131
132132 if (this .showPreviousWeeks ) {
133133 date .startOf (' Month' );
134134 }
135135
136- const end = idate (this .Xdate ).add (this .visibleMonths - 1 , ' Month' ).endOf (' Month' );
136+ const end = dayjs (this .Xdate ).add (this .visibleMonths - 1 , ' Month' ).endOf (' Month' );
137137
138138 while (date .isBefore (end)) {
139139 const monthKey = date .format (' YYYY/MM' );
140140
141141 months .push ({
142142 title: date .format (' MMMM' ),
143- date: idate (date),
143+ date: dayjs (date),
144144 selections: this .monthSelections [monthKey],
145145 });
146146
0 commit comments