Skip to content

A self-hosted media server and file management system

fix: reset date on datepicker does not apply local timezone

aminnausin553cd19224b7
diff --git a/resources/js/components/cedar-ui/date-picker/useDatePicker.ts b/resources/js/components/cedar-ui/date-picker/useDatePicker.ts
index 2fe5d7f8..6f410e1b 100644
--- a/resources/js/components/cedar-ui/date-picker/useDatePicker.ts
+++ b/resources/js/components/cedar-ui/date-picker/useDatePicker.ts
@@ -194,7 +194,7 @@ export default function useDatePicker(props: DatePickerProps, datePickerInput: R
function resetDate() {
if (datePickerValue.value) {
- return setDate(new Date(Date.parse(datePickerValue.value)));
+ return setDate(new Date(datePickerValue.value.replace(/-/g, '/')));
}
setDate(new Date(), props.useDefaultDate);