From 0e12a254c27b878a4901dc4e5c50c23d05ab3eca Mon Sep 17 00:00:00 2001 From: "Zimin A.N." Date: Mon, 4 May 2026 03:42:11 +0300 Subject: [PATCH] =?UTF-8?q?fix(admin-ui):=20datetime=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B8=20schema=20=D1=82?= =?UTF-8?q?=D0=B5=D1=80=D1=8F=D0=BB=D0=B8=20=D0=B2=D1=80=D0=B5=D0=BC=D1=8F?= =?UTF-8?q?=20=E2=80=94=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20DateTimeF?= =?UTF-8?q?ield?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Поля с format=date-time в schema (например orbit.epoch у spacecraft) рендерились через DatePicker и форс-сетили T00:00:00Z. Теперь та же DateTimeField (DatePicker + time input) что и для validFrom/validTo. format=date по-прежнему чистый DatePicker без времени. --- .../src/components/form/SchemaDrivenForm.tsx | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx b/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx index be01a86..700db52 100644 --- a/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx +++ b/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx @@ -413,6 +413,22 @@ const FieldBody = ({ if (isDateFormat(schema)) { const isDateTime = schema.format === 'date-time' + if (isDateTime) { + return ( + ( + field.onChange(iso || undefined)} + /> + )} + /> + ) + } return ( - field.onChange(d ? (isDateTime ? formatIsoDateTime(d) : formatIsoDate(d)) : undefined) - } + onChange={(d) => field.onChange(d ? formatIsoDate(d) : undefined)} /> )} />