palantir/blueprint

Dateinput and Dateinput2 popover and maxDate behavior

开放

#5,771 创建于 2022年11月28日

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

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Environment

  • Package version(s): Datetime 4.4.7 and Datetime2 0.9.5
  • Operating System: Windows 11
  • Browser name and version: Chrome 107 and Firefox 107

Code Sandbox

https://codesandbox.io/s/bold-david-nbr76c?file=/src/DatetimeExample.tsx

Steps to reproduce

Popover

  1. Click on Dateinput or Dateinput2 to show popover
  2. Change the hour field of the time picker to something like 10
  3. Click outside the popover to close it.
  4. Click on the Dateinput or Dateinput2 to show popover
  5. Change the hour field of the time picker to something like 11
  6. Click outside the popover to close it.

maxdate

  1. Click on Dateinput or Dateinput2 to show popover
  2. Change the hour field of the time picker to something like 10

Actual behavior

Popover With step 6 the popover will close and reopen straight away

maxdate For Dateinput it will accept the picked time but Dateinput will show a red border indicating the selected time is invalid

Expected behavior

Popover With step 6 the popover should close and not reopen

maxdate The maxdate should allow any hour of the maxday for Dateinput2 component

Possible solution

贡献者指南