From 0ea958f28a5c630a6f6f7d858fbf5f5edde10200 Mon Sep 17 00:00:00 2001 From: Julien <120588494+julien4215@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:58:23 +0200 Subject: [PATCH] fix date format sent to Hyperion --- src/app/activate/page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/activate/page.tsx b/src/app/activate/page.tsx index 67dd4e2..139a511 100644 --- a/src/app/activate/page.tsx +++ b/src/app/activate/page.tsx @@ -23,7 +23,7 @@ import { import { toast } from "@/components/ui/use-toast"; import { zPassword } from "@/lib/types"; import { zodResolver } from "@hookform/resolvers/zod"; -import { addYears } from "date-fns"; +import { addYears, format } from "date-fns"; import { isValidPhoneNumber } from "libphonenumber-js"; import { useRouter } from "next/navigation"; import { useState } from "react"; @@ -119,7 +119,9 @@ const RegisterPage = () => { name: values.name, password: values.password, nickname: values.nickname, - birthday: values.birthday?.toString(), + birthday: values.birthday + ? format(values.birthday, "yyyy-MM-dd") + : undefined, phone: values.phone, floor: values.floor as FloorsType | undefined | null, promo: values.promo ? parseInt(values.promo) : undefined,