Open severinlandolt opened 2 years ago
This is very similar to a previous request: https://github.com/palantir/blueprint/issues/4398
Adding MTD and YTD is currently possible, all you have to do is set the shortcuts
prop on DateRangeInput
or DateRangePicker
.
However, it's not very easy to extend the set of default shortcuts, because we don't expose those in the public API:
I'd be open to an API improvement which makes it easy to extend the default set instead of overriding the default shortcuts.
Environment
Package version(s): Latest Blueprint version Browser and OS versions: Latest Chrome version
Feature request
It would be great to extend the default shortcuts of the date range picker with the following options:
Examples
MTD: Today is April 24th, 2022. The month-to-date option would include the range from 01-04-2022 to 24-04-2022. YTD: Today is April 24th, 2022. The year-to-date option would include the range from 01-01-2022 to 24-04-2022.