仓库指标
- 星标
- (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:

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