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

[Feature Request] Calendar 日历组件 希望增加动态修改已选中日期的功能 #13347

Closed
qwasfun opened this issue Feb 10, 2025 · 3 comments

Comments

@qwasfun
Copy link

qwasfun commented Feb 10, 2025

这个功能解决了什么问题?

可以通过 default-date 设置初始选中日期,使用方法 getSelectedDate 获取选中的日期,但未找到动态修改已选中的日期的方法。

希望新增组件方法,允许动态修改日历组件已选中的日期

你期望的 API 是什么样子的?

const calendarRef = ref('calendar');
calendarRef.value?.setDate([Date,Date]);

或者用 v-model 实现?

@inottn
Copy link
Collaborator

inottn commented Feb 10, 2025

你好,有一种临时解决方法,你可以动态的去修改 default-date 属性。

@qwasfun
Copy link
Author

qwasfun commented Feb 10, 2025

感谢回复,我明天再试试看

@qwasfun
Copy link
Author

qwasfun commented Feb 14, 2025

已有功能可以实现需求 👍

在select事件里,用 getSelectedDate 获取的值修改 default-date 属性

@qwasfun qwasfun closed this as completed Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants