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 合併指標
 (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

貢獻者指南