I want to add some more custom defined range to existing ones, for e.g: last 6 months, or last year.
If I add using definedRanges options, it just overrides the existing.
I want to append few more to existing date ranges.
I tried this but I think it doesn't suport function,
definedRanges={(prev: DefinedRange[]): DefinedRange[] => [
...prev,
{
label: 'Last 6 months',
startDate: new Date(),
endDate: (new Date().getMonth() - 6),
},
]}
Is there any way to append to existing date ranges?
Thanks
Hi,
I want to add some more custom defined range to existing ones, for e.g: last 6 months, or last year. If I add using definedRanges options, it just overrides the existing. I want to append few more to existing date ranges.
I tried this but I think it doesn't suport function, definedRanges={(prev: DefinedRange[]): DefinedRange[] => [ ...prev, { label: 'Last 6 months', startDate: new Date(), endDate: (new Date().getMonth() - 6), }, ]}
Is there any way to append to existing date ranges? Thanks