palantir/blueprint

Wrong maxTime displayed in DateRangeInput with timePickerProps

Open

#3,509 opened on May 1, 2019

View on GitHub
 (2 comments) (3 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
Domain: APIP2Package: datetimeType: bughelp wanted

Description

Environment

  • Package version(s): @blueprintjs/core:3.15.1 @blueprintjs/datetime:3.9.0 react:16.8.6
  • Browser and OS versions: Google Chrome 74 Mozilla Firefox 66 Linux Mint 18.3

https://codesandbox.io/s/m7n7mvvoyy

Steps to reproduce

  1. In a DateRangeInput set the minDate and maxDate and use the same minDate and maxDate to supply minTime and maxTime (respectively) in said DateRangeInput's timePickerProps.
  2. Open the DateRangePicker by focusing in the input box.

Actual behavior

Notice that the times at the bottom of the DateRangePicker popover both contain the time taken from the minTime prop supplied. The time from the maxTime prop doesn't get applied.

Expected behavior

The time input on the left should contain the time extracted from the supplied minTime prop and the time input on the right should contain the time extracted from the supplied maxTime prop.

Possible solution

Contributor guide