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(datetime-picker): 默认最小日期最大日期使用常量; #694

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

NickeyLin
Copy link
Contributor

@NickeyLin NickeyLin commented Dec 21, 2023

将默认的最小日期最大日期改用常量,修复当未设置最小日期/最大日期时,在每个渲染周期都使用新的Date对象,导致下段代码异常重复执行,而引起 confirm 时 value 不正确(fix #663 ):

    useUpdateEffect(() => {
      const nextValue = formatValue(value)

      if (nextValue && nextValue.valueOf() !== currentDate?.valueOf()) {
        setCurrentDate(nextValue)
      }
    }, [value, filter, minDate, maxDate])

@3lang3 3lang3 merged commit 27b9d74 into 3lang3:main Dec 22, 2023
3 of 4 checks passed
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.

🐛 [Bug]: DatetimePicker在Form中,onConfirm返回的value错误
2 participants