Added more date filter options.

This commit is contained in:
Mike Cao committed 2024-03-22 14:35:41 -07:00
1 parent b873ea38ea
commit 09a161d04a
3 files changed
+12 -3

No files matched your search

+2 -2
View File
@@ -182,8 +182,8 @@ export function parseDateRange(value: string | object, locale = 'en-US'): DateRa
case 'month':
return {
startDate: subMonths(startOfMonth(now), num),
endDate: subMonths(endOfMonth(now), num),
unit: 'day',
endDate: subMonths(endOfMonth(now), num ? 1 : 0),
unit: num ? 'month' : 'day',
offset: 0,
num: num || 1,
value,