fix Time call
This commit is contained in:
@@ -189,11 +189,11 @@ const currentMonthFilteredRecords = computed(() => filteredRecords.value.filter(
|
||||
const monthTitle = computed(() => `${props.modelValue.getFullYear()} 年 ${props.modelValue.getMonth() + 1} 月`);
|
||||
const calendarDayList = computed<CalendarDay[]>(() => {
|
||||
const beginDate = getCalendarBeginDate(props.modelValue);
|
||||
const todayText = Time.formatDate(new Date());
|
||||
const todayText = Time.toDate(new Date());
|
||||
const list: CalendarDay[] = [];
|
||||
for (let index = 0; index < 42; index += 1) {
|
||||
const date = addDays(beginDate, index);
|
||||
const dateText = Time.formatDate(date);
|
||||
const dateText = Time.toDate(date);
|
||||
list.push({
|
||||
key: dateText,
|
||||
day: String(date.getDate()),
|
||||
@@ -292,12 +292,12 @@ function formatRecordTime(value?: number): string {
|
||||
if (!date) {
|
||||
return "-";
|
||||
}
|
||||
return Time.formatDateTime(date);
|
||||
return Time.toDateTime(date);
|
||||
}
|
||||
|
||||
function getRecordDateText(record: EventRecord): string {
|
||||
const date = Time.toDateObject(record.registeredAt);
|
||||
return date ? Time.formatDate(date) : "";
|
||||
return date ? Time.toDate(date) : "";
|
||||
}
|
||||
|
||||
function isInCurrentMonth(value?: number): boolean {
|
||||
@@ -329,7 +329,7 @@ function addMonths(date: Date, months: number): Date {
|
||||
}
|
||||
|
||||
function toDateValue(date: Date): number {
|
||||
return Number(Time.formatDate(date).replaceAll("-", ""));
|
||||
return Number(Time.toDate(date).replaceAll("-", ""));
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user