ant-design-vue
ant-design-vue copied to clipboard
日期周的选择,结合dayjs.updateLocale的yearStart设置超过7的话使用会报错
trafficstars
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.1.0
Environment
vue:3.4.21
Reproduction link
https://next.antdv.com/components/date-picker-cn
Steps to reproduce
<a-range-picker v-model:value="value" picker="week" :allowClear="false" :inputReadOnly="true"
<template #dateRender="{ current }">
{{ current.date() }}
import type { Dayjs } from 'dayjs'; import dayjs from 'dayjs'; import updateLocale from 'dayjs/plugin/updateLocale'; import 'dayjs/locale/ja'; dayjs.extend(updateLocale); dayjs.updateLocale('ja', { weekStart: 1, yearStart: 8 });
设置当年8号为第一周的话,组件选到1月的时候就会报错
What is expected?
正常设置yearStart不报错
What is actually happening?
切到24年1月的时候控制台报错
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days