tremor
tremor copied to clipboard
Would be nice to have quarter as a relative date (or custom dates)
Currently it looks like relative date choices are (last 7 days, last 30 days, MTD, YTD)
What if there was also an option for last quarter or QTD? Or last year? Or All (to beginning of data)
Thanks @nmandal for the comment, having a QTD option definitely makes sense. We are generally thinking about implementing a solution that allows users to add custom relative date options. Wdyt?
That makes great sense to me. I think having the choice between a default set of relative date choices similar to what exists today and then having the choice to input a map similar to below for custom options would be great.
Are you thinking about something like this?
export const relativeFilterOptions = [
{
value: 'w',
name: 'Last 7 days',
selectedStartDay(sub(today, { days: 7 }));
selectedEndDay(today);
},
...
];
(from: https://github.com/tremorlabs/tremor/blob/873a609bb37fef8dcf3f62097593a4257bc9dad8/src/components/input-elements/Datepicker/utils.tsx#L15)
closing as it is resolved in v2