palantir/blueprint

Wrong maxTime displayed in DateRangeInput with timePickerProps

Open

#3509 aperta il 1 mag 2019

Vedi su GitHub
 (2 commenti) (3 reazioni) (0 assegnatari)TypeScript (2167 fork)batch import
Domain: APIP2Package: datetimeType: bughelp wanted

Metriche repository

Star
 (20.263 star)
Metriche merge PR
 (Merge medio 43g 10h) (27 PR mergiate in 30 g)

Descrizione

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

Guida contributor