palantir/blueprint

DateRangePicker shortcut still marked as active after manually updating the range

开放

#5,223 创建于 2022年4月4日

 (0 条评论) (1 个反应) (0 位负责人)TypeScript (2,167 个派生)batch import
P2Package: datetimeType: bughelp wanted

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

  1. Create Date Range Picker similar to https://blueprintjs.com/docs/#datetime/daterangepicker image
  2. Select "Past 6 months" and notice shortcut selected image
  3. Change date range manually to a different range image

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.

贡献者指南