palantir/blueprint
View on GitHubDateRangePicker shortcut still marked as active after manually updating the range
Open
#5,223 opened on Apr 4, 2022
P2Package: datetimeType: bughelp wanted
Description
Environment
- Package version(s): "@blueprintjs/core": "^3.40.1", "@blueprintjs/datetime": "^3.22.0",
- Browser name and version: Chrome
Code Sandbox
Link to a minimal repro (fork this code sandbox):
Steps to reproduce
- Create Date Range Picker similar to https://blueprintjs.com/docs/#datetime/daterangepicker

- Select "Past 6 months" and notice shortcut selected

- Change date range manually to a different range

Actual behavior
"Past 6 months" shortcut still selected
Expected behavior
No shortcut marked as selected
Possible solution
Reset shortcut selection on date range changed in case it's updated.