[datetime] DRP should make it easier to select by weeks, months, and quarters
#4,172 创建于 2020年6月11日
描述
// Re-posting an internal feature request for the DateRangePicker component
Feature request
One of the requests I have gotten is the ability to analyze data on different pre-defined date intervals (e.g. monthly, quarterly, and yearly). A use case for this is financial analysis, which revolves around monthly, quarterly, and yearly reporting.
After using the Date Ranger Picker for a bit, I have found it difficult to actually filter on pre-defined time intervals (e.g. months, quarters, years). The two big issues as I see them are:
- The default shortcuts are all oriented around getting the range of days relative to today (e.g. past year is the last 365/366 days before and including today) as opposed to pre-defined periods of time (like the current quarter or the current month).
- Selection of the exact time range I want often involves a lot of button clicks.
I think there is a better way to design the date range picker so that users don't have to click so many buttons in order to select, for example, the last 3 completed quarters or the last 18 completed months. The proposed approach would also reduce the likelihood of someone accidentally selecting the wrong range when trying to select, for example, all days in the last 9 completed months.
Attaching screenshots of some conceptual sketches. Note: When using this as a date range picker, assume the calendar portion would be doubled (one for Start and End values each) as it is in the current implementation.
Ultimately, the output of getting a start date and end date would be exactly the same. This approach would just make it a lot easier for users to select pre-defined date intervals.
Daily Selection (existing functionality)

Weekly Selection

Monthly Selection

Quarterly Selection

Yearly Selection
