add explicit type for string-based datetimes, replacing third-party datetime type with internal DateTime type

This commit is contained in:
MaysWind
2025-08-25 00:31:30 +08:00
parent f196ce969b
commit 25681f622d
35 changed files with 423 additions and 404 deletions
+2 -5
View File
@@ -7,7 +7,7 @@ import { useUserStore } from '@/stores/user.ts';
import { type NameValue } from '@/core/base.ts';
import { type WeekDayValue } from '@/core/datetime.ts';
import { arrangeArrayWithNewStartIndex } from '@/lib/common.ts';
import { getCurrentYear } from '@/lib/datetime.ts';
import { getAllowedYearRange } from '@/lib/datetime.ts';
export interface TimePickerValue {
value: string;
@@ -34,10 +34,7 @@ export function useDateTimeSelectionBase() {
const isSecondTwoDigits = ref<boolean>(isLongTimeSecondTwoDigits());
const isMeridiemIndicatorFirst = ref<boolean>(isLongTimeMeridiemIndicatorFirst() || false);
const yearRange = ref<number[]>([
2000,
getCurrentYear() + 1
]);
const yearRange = ref<number[]>(getAllowedYearRange());
const meridiemItems = computed<NameValue[]>(() => getAllMeridiemIndicators());