feat: add localization support for SingleDatePicker and adjust month selection behavior

This commit is contained in:
Astrian Zheng 2025-02-24 14:05:14 +11:00
parent ade8eddaf7
commit 0e259b6746
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ const date = ref(new Date())
<template> <template>
<div>{{date.toDateString()}}</div> <div>{{date.toDateString()}}</div>
<div class="container"> <div class="container">
<SingleDatePicker v-model="date" /> <SingleDatePicker v-model="date" localization="zh-CN" />
</div> </div>
</template> </template>

View File

@ -36,7 +36,7 @@
}) })
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
const selectMonth = ref(true) const selectMonth = ref(false)
const uniqueId = generateUniqueId() const uniqueId = generateUniqueId()
const currentMonth = ref(new Date().getMonth()) const currentMonth = ref(new Date().getMonth())
const currentYear = ref(new Date().getFullYear()) const currentYear = ref(new Date().getFullYear())