palantir/blueprint

Add active menu styles to shortcuts for Date Range input

开放

#4,052 创建于 2020年4月9日

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

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (平均合并 43天 10小时) (30 天内合并 27 个 PR)

描述

Environment

  • Package version(s): 3.15.2
  • Browser and OS versions: Chrome

Feature request

Expose selectedShortcutIndex and onShortcutChange props to DateRange Input, similar to DateRangePicker

Examples

I'm looking to use DateRangeInput to allow selection of month(s) at a time. Usually, the users are interested in current month, and forward and backward a couple of months. Hence I'm providing them dynamic shortcuts, depending on their current month selection. Since the selected shortcut index isn't exposed, the component erroneously shows the previous month being selected. The shortcuts to months are dynamically generated, so when April is selected it looks so:

image

And when March is selected, and then re-opening it, the page loads with February selected since it is now at index 1: image

贡献者指南