From 7935a70b4d59274063b4f0af489b4f76e8394223 Mon Sep 17 00:00:00 2001 From: Nikolay Bonev Date: Wed, 15 Jan 2025 16:02:41 +0200 Subject: [PATCH] small adjustment to time of the new endDate --- app/components/booking/form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/booking/form.tsx b/app/components/booking/form.tsx index e5dcdb6c7..b38afb806 100644 --- a/app/components/booking/form.tsx +++ b/app/components/booking/form.tsx @@ -1,6 +1,5 @@ import { useMemo, useState } from "react"; import { useLoaderData, useNavigation } from "@remix-run/react"; -import { endOfDay } from "date-fns"; import { useAtom } from "jotai"; import { DateTime } from "luxon"; import { useZorm } from "react-zorm"; @@ -363,8 +362,9 @@ export function BookingForm({ */ const newStartDate = new Date(event.target.value); if (endDate && newStartDate > new Date(endDate)) { + const now = new Date(); const newEndDate = dateForDateTimeInputValue( - endOfDay(newStartDate) + new Date(now.setHours(18, 0, 0)) ); setEndDate( newEndDate.substring(0, newEndDate.length - 3)