aboutsummaryrefslogtreecommitdiff
path: root/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-05-26 13:52:00 +0200
committerFlorian Dold <florian@dold.me>2023-05-26 13:52:00 +0200
commit96d9ea3840626f71efe38018b75748d8338565fa (patch)
treed1f04ecbb58750af79b3d0cb0420ba4fdf6d05a2 /packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
parentcd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854 (diff)
taler-util,wallet-core: make AbsoluteTime opaque
Diffstat (limited to 'packages/exchange-backoffice-ui/src/handlers/InputDate.tsx')
-rw-r--r--packages/exchange-backoffice-ui/src/handlers/InputDate.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx b/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
index e834b6cdb..1fd81aad9 100644
--- a/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
+++ b/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx
@@ -18,9 +18,9 @@ export function InputDate<T extends object, K extends keyof T>(
converter={{
//@ts-ignore
fromStringUI: (v): AbsoluteTime => {
- if (!v) return { t_ms: "never" };
+ if (!v) return AbsoluteTime.never();
const t_ms = parse(v, pattern, Date.now()).getTime();
- return { t_ms };
+ return AbsoluteTime.fromMilliseconds(t_ms);
},
//@ts-ignore
toStringUI: (v: AbsoluteTime) => {