You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a DateRangePicker and setting granularity dynamically from "day" to "second", the date input gets cleared when entering the first character of the time input. See repro steps below for video, detailed steps & minimal repro code.
🤔 Expected Behavior?
When entering the time, the date that the user just entered should not be cleared.
😯 Current Behavior
When entering the time, the date that the user just entered is cleared. This only happens the first time.
💁 Possible Solution
Work-around: set a key based on the granularity to force React to create a new component instance with new internal state whenever granularity changes.
🔦 Context
No response
🖥️ Steps to Reproduce
See screen recording & minimal repro code below.
Steps to repro:
Change the granularity from "day" to "second". This is important. When making the granularity static/hard-coded, the bug doesn't happen.
Start typing the date.
When the first character of the time is entered, the date input is cleared again!
Provide a general summary of the issue here
When using a
DateRangePicker
and settinggranularity
dynamically from"day"
to"second"
, the date input gets cleared when entering the first character of the time input. See repro steps below for video, detailed steps & minimal repro code.🤔 Expected Behavior?
When entering the time, the date that the user just entered should not be cleared.
😯 Current Behavior
When entering the time, the date that the user just entered is cleared. This only happens the first time.
💁 Possible Solution
Work-around: set a
key
based on thegranularity
to force React to create a new component instance with new internal state whenevergranularity
changes.🔦 Context
No response
🖥️ Steps to Reproduce
See screen recording & minimal repro code below.
Steps to repro:
granularity
from"day"
to"second"
. This is important. When making the granularity static/hard-coded, the bug doesn't happen.Screen.Recording.2024-11-11.at.11.26.57.mov
Version
1.4.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS / Ubuntu
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: