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

DatePicker组件设置 endDate={new Date()} 后, 选历史年份后月份只有当前月 #2921

Open
hooliy opened this issue Jan 6, 2025 · 1 comment
Assignees

Comments

@hooliy
Copy link

hooliy commented Jan 6, 2025

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

最新版

平台

weapp

重现链接

重现步骤

image
 <DatePicker
                title={title}
                visible={isDatePickerVisible}
                showChinese
                type={type}
                endDate={new Date()}
                value={selectedDate}
                defaultValue={selectedDate}
                onConfirm={(options, values) => {
                    const date = dayjs(values
                        .slice(0, 3)
                        .join('-') + values
                            .slice(3)
                            .join(':')).format('YYYY-MM-DD HH:mm:ss')
                    setSelectedDate(dayjs(date).toDate())
                    setDatePickerVisible(false)
                    onChange(date)
                }}

                onCancel={() => setDatePickerVisible(false)}
            />

期望的结果是什么?

切换年份时应该显示所有月,而不是今年的当前月份

实际的结果是什么?

月份只有当前月

环境信息

No response

其他补充信息

No response

@irisSong irisSong self-assigned this Jan 10, 2025
@irisSong
Copy link
Collaborator

有完整复现demo吗

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

2 participants