blueprint icon indicating copy to clipboard operation
blueprint copied to clipboard

[DateRangeInput] Input is blank when choosing date

Open LucasYver opened this issue 3 years ago • 1 comments

Environment

Package version(s): @blueprintjs/core 3.49.1

Steps to reproduce

  1. Use this setup, with any formatDate and parseDate.
  <DateRangeInput
      value={[from, to ]}
      formatDate={formatDate}
      parseDate={parseDate}
      onChange={(date) => onStateChange([ date[0]?.toISOString(), date[1]?.toISOString() ])} />

Actual behavior

https://user-images.githubusercontent.com/16732818/171377494-7dad2f8c-44e7-4a45-8dac-2576166ff356.mov

Expected behavior

The to value should not be blank on date click.

Possible solution

To fix this issue i don't use value props anymore, but i would like understand why, when we use value we have this behaviour.

LucasYver avatar Jun 01 '22 09:06 LucasYver

Is it possible to reproduce this in a code sandbox? Also please include the version of @blueprintjs/datetime you are using, as the core package version is insufficient. Lastly, please try upgrading to the latest Blueprint, as you are many versions behind.

adidahiya avatar Jun 01 '22 13:06 adidahiya