palantir/blueprint

Add active menu styles to shortcuts for Date Range input

Open

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

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)TypeScript (20,263 star) (2,167 fork)batch import
P3Package: datetimeType: enhancementhelp wanted

描述

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

贡献者指南

Add active menu styles to shortcuts for Date Range input · palantir/blueprint#4052 | Good First Issue