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 rangeType error when select endTime first, close #1563 #1565

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

pointhalo
Copy link
Collaborator

@pointhalo pointhalo commented Apr 20, 2023

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

当先选择endTime, handlePanelChange 中的值为 [empty, xxx];
Before:
20230420204923_rec_

After:

  • 修改 timepicker foudation 的 formatValue 逻辑,原逻辑未对 undefined 做处理,会导致 formatToString 抛出 error

20230420204544_rec_

TODO:
需确认的问题,当前 validateDates 的逻辑亦未对 array[0]为空,array[1] 有值的情况做判断,所以首次选择时,invalid 并不正确。第二次时才正确(即 input的 validateStatus更新,背景色为error 色)。
validateDates应该也需要做对应的变更。

Changelog

🇨🇳 Chinese


🇺🇸 English

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 587be99:

Sandbox Source
pr-story Configuration
Semi Design: Simple Story Configuration

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 85.71% and project coverage change: -0.01 ⚠️

Comparison is base (2f28e39) 87.99% compared to head (1fda67d) 87.98%.

❗ Current head 1fda67d differs from pull request most recent head 587be99. Consider uploading reports for the commit 587be99 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1565      +/-   ##
==========================================
- Coverage   87.99%   87.98%   -0.01%     
==========================================
  Files         433      433              
  Lines       25048    25053       +5     
  Branches     6287     6288       +1     
==========================================
+ Hits        22040    22044       +4     
- Misses       3008     3009       +1     
Impacted Files Coverage Δ
packages/semi-foundation/timePicker/foundation.ts 89.76% <85.71%> (-0.24%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants