Merged in fix/SW-3078-wrong-dates-time-zones (pull request #2388)
fix(SW-3078): change to string instead of Date in Zod schema * fix(SW-3078): change to string instead of Date in Zod schema Approved-by: Michael Zetterberg Approved-by: Linus Flood
This commit is contained in:
@@ -20,8 +20,8 @@ import useLang from "@/hooks/useLang"
|
||||
import styles from "./newDates.module.css"
|
||||
|
||||
interface NewDatesProps {
|
||||
checkInDate: Date
|
||||
checkOutDate: Date
|
||||
checkInDate: string
|
||||
checkOutDate: string
|
||||
}
|
||||
|
||||
export default function NewDates({ checkInDate, checkOutDate }: NewDatesProps) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
export function dateHasPassed(date: Date, time: string) {
|
||||
export function dateHasPassed(date: string, time: string) {
|
||||
const hour = dt(time, "HH:mm").hour()
|
||||
const minute = dt(time, "HH:mm").minute()
|
||||
return dt(date).hour(hour).minute(minute).isBefore(dt(), "minutes")
|
||||
|
||||
Reference in New Issue
Block a user