Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日期周的选择,结合dayjs.updateLocale的yearStart设置超过7的话使用会报错 #7437

Open
1 task done
yaokaibao-tre opened this issue Mar 18, 2024 · 0 comments

Comments

@yaokaibao-tre
Copy link

yaokaibao-tre commented Mar 18, 2024

  • 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月的时候控制台报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant