diff --git a/packages/web/components/common/DateRangePicker/index.tsx b/packages/web/components/common/DateRangePicker/index.tsx index 8c57e5bac1..2070af2911 100644 --- a/packages/web/components/common/DateRangePicker/index.tsx +++ b/packages/web/components/common/DateRangePicker/index.tsx @@ -89,70 +89,93 @@ const DateRangePicker = ({ - { - let typeDate = date as DateRangeType; - if (!typeDate || typeDate?.from === undefined) { - typeDate = { - from: range?.from, - to: range?.from - }; + - - - - } - /> + > + { + let typeDate = date as DateRangeType; + if (!typeDate || typeDate?.from === undefined) { + typeDate = { + from: range?.from, + to: range?.from + }; + } + if (typeDate?.to === undefined) { + typeDate.to = typeDate.from; + } + + if (typeDate?.from) { + typeDate.from = new Date(typeDate.from.setHours(0, 0, 0, 0)); + } + if (typeDate?.to) { + typeDate.to = new Date(typeDate.to.setHours(23, 59, 59, 999)); + } + + setRange(typeDate); + onChange?.(typeDate); + }} + footer={ + + + + + } + /> + )} diff --git a/packages/web/components/common/DateTimePicker/index.tsx b/packages/web/components/common/DateTimePicker/index.tsx index e268e013ef..d84811030a 100644 --- a/packages/web/components/common/DateTimePicker/index.tsx +++ b/packages/web/components/common/DateTimePicker/index.tsx @@ -136,23 +136,45 @@ const DateTimePicker = ({ top={`${position.top}px`} left={`${position.left}px`} zIndex={1500} - css={{ - '--rdp-background-color': '#d6e8ff', - '--rdp-accent-color': '#0000ff' - }} + p={3} > - { - setSelectedDate(date); - onChange?.(date); - setShowSelected(false); + + > + { + setSelectedDate(date); + onChange?.(date); + setShowSelected(false); + }} + /> + )}