palantir/blueprint

DateInput3 doesn't regain value when parsing user input

开放

#6,482 创建于 2023年10月20日

 (2 条评论) (1 个反应) (0 位负责人)TypeScript (2,167 个派生)batch import
P1Package: datetimeType: bughelp wanted

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (平均合并 43天 10小时) (30 天内合并 27 个 PR)

描述

Environment

  • Browser name and version: Chrome 118.0.5993.70
  • Package version: @blueprintjs/datetime2 v2.2.1

Code Sandbox

Reproducible on docs page

Steps to reproduce

  1. Click on a date in the popover to initialize a value (ie "10/25/2023")
  2. Delete a portion of the date component (in this case what could be left would be "10/25").
  3. When retyping the same value in, the date isn't reselected in the popover and clicking out of the input will error.

Actual behavior

Retying the value will throw an out of range or invalid date error, I think depending on the specificity of the time (just the date or including seconds, for example)

2023-10-20_10-44-00 (1)

Expected behavior

The date will be re-selected in the component.

Possible solution

贡献者指南