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

fix(TimePicker): #7267 #7414

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aShu-guo
Copy link
Contributor

@aShu-guo aShu-guo commented Mar 7, 2024

初次选中时未检查disabled状态,而是默认选中第一个

const mergedHour = Math.max(0, newHour);
const mergedMinute = Math.max(0, newMinute);
const mergedSecond = Math.max(0, newSecond);
const mergedHour = newHour < 0 ? minutes.value.find(hour => !hour.disabled).value : newHour;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是 hour find 吧

另外如果find 不到怎么处理呢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,应该是hours.find。在find不到时,仍然取默认的newHour,newMinute,newSecond如何呢?

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

Successfully merging this pull request may close these issues.

None yet

2 participants