From 3e95ae356a98d01e523bdf48547db4114ff224fe Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 22 May 2023 10:40:13 -0300
Subject: fix break on build

---
 packages/exchange-backoffice-ui/src/handlers/InputDate.tsx | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

(limited to 'packages/exchange-backoffice-ui/src/handlers/InputDate.tsx')

diff --git a/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx b/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
index 00dd59996..e834b6cdb 100644
--- a/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
+++ b/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
@@ -4,24 +4,26 @@ import { CalendarIcon } from "@heroicons/react/24/outline";
 import { VNode, h } from "preact";
 import { format, parse } from "date-fns";
 
-export function InputDate(
-  props: { pattern?: string } & UIFormProps<AbsoluteTime>,
+export function InputDate<T extends object, K extends keyof T>(
+  props: { pattern?: string } & UIFormProps<T, K>,
 ): VNode {
   const pattern = props.pattern ?? "dd/MM/yyyy";
   return (
-    <InputLine<AbsoluteTime>
+    <InputLine<T, K>
       type="text"
       after={{
         type: "icon",
         icon: <CalendarIcon class="h-6 w-6" />,
       }}
       converter={{
-        fromStringUI: (v) => {
+        //@ts-ignore
+        fromStringUI: (v): AbsoluteTime => {
           if (!v) return { t_ms: "never" };
           const t_ms = parse(v, pattern, Date.now()).getTime();
           return { t_ms };
         },
-        toStringUI: (v) => {
+        //@ts-ignore
+        toStringUI: (v: AbsoluteTime) => {
           return !v || !v.t_ms
             ? ""
             : v.t_ms === "never"
-- 
cgit v1.2.3

