Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Merge branch 'master' into fix/datepicker-tz-display

Ziinc0119a437c055
diff --cc studio/components/ui/DatePicker/DatePicker.tsx
index dbb87661e60,ba89eeecfe1..391d39cf34e
--- a/studio/components/ui/DatePicker/DatePicker.tsx
+++ b/studio/components/ui/DatePicker/DatePicker.tsx
@@@ -66,16 -68,11 +74,17 @@@ function _DatePicker(
if (!to) {
setAppliedEndDate(null)
} else if (to !== appliedEndDate?.toISOString()) {
- const end = dayjs(to).toDate()
- setAppliedEndDate(end)
- setEndDate(end)
+ const end = dayjs(to)
+ const endDate = end.toDate()
+ setAppliedEndDate(endDate)
+ setEndDate(endDate)
+ setEndTime({
+ HH: end.format("HH"),
+ mm: end.format("mm"),
+ ss: end.format("ss"),
+ })
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [to, from])
function handleDatePickerChange(dates: [from: Date | null, to: Date | null]) {
@@@ -91,15 -88,17 +100,15 @@@
setAppliedEndDate(endDate)
const payload = {
- from: dayjs
- .utc(startDate)
+ from: dayjs(startDate)
- .second(startTime.ss)
- .minute(startTime.mm)
- .hour(startTime.HH)
+ .second(Number(startTime.ss))
+ .minute(Number(startTime.mm))
+ .hour(Number(startTime.HH))
.toISOString(),
- to: dayjs
- .utc(endDate || startDate)
+ to: dayjs(endDate || startDate)
- .second(endTime.ss)
- .minute(endTime.mm)
- .hour(endTime.HH)
+ .second(Number(endTime.ss))
+ .minute(Number(endTime.mm))
+ .hour(Number(endTime.HH))
.toISOString(),
}
if (onChange) onChange(payload)