palantir/blueprint
View on GitHubAdd active menu styles to shortcuts for Date Range input
Open
#4,052 opened on Apr 9, 2020
P3Package: datetimeType: enhancementhelp wanted
Description
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:

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