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

u-datetime-picker 完整时间设置minDate问题 #1060

Open
panxch opened this issue May 23, 2024 · 0 comments
Open

u-datetime-picker 完整时间设置minDate问题 #1060

panxch opened this issue May 23, 2024 · 0 comments

Comments

@panxch
Copy link

panxch commented May 23, 2024

版本

2.0.37

重现步骤

设置minDate是当前时间,打开picker后随便选择一个年,再选择当年的时候会出现列乱跳,比如原来选择的2024 05 24 10 30,切换到2025 05 24 10 30,再选择2024年就会出现月日时分都变了

期望的结果是什么?

期望选择2024 05 24 10 30后显示的年月日是准确的

实际的结果是什么?

实际不是期望的结果


可以尝试在u-datetime-picker.vue页面的updateColumns方法种增加判断新的列内容与旧列内容比较,判断新列内容是否有变化有变化的话先重置下innerDefaultIndex的对应列的值是0 或者是值在新列的数组索引,然后再去设置picker的columns

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