merge newui branch

This commit is contained in:
Gani Georgiev
2026-04-18 16:29:34 +03:00
parent 58f605e90c
commit 4c44044c0c
804 changed files with 58660 additions and 56663 deletions
+37
View File
@@ -0,0 +1,37 @@
// {
// collection: undefined,
// originalRecord: undefined,
// record: undefined,
// field: undefined,
// }
export function input(props) {
const uniqueId = "date_" + app.utils.randomString();
return t.div(
{ className: "record-field-input field-type-date" },
t.div(
{ className: "field" },
t.label(
{ htmlFor: uniqueId },
t.i({ className: app.fieldTypes.date.icon }),
t.span({ className: "txt" }, () => props.field.name),
),
t.input({
id: uniqueId,
step: 1,
type: "datetime-local",
name: () => props.field.name,
required: () => props.field.required,
value: () => app.utils.toDatetimeLocalInputValue(props.record[props.field.name]),
onchange: (e) => {
props.record[props.field.name] = app.utils.toRFC3339Datetime(e.target.value);
},
}),
),
() => {
if (props.field.help) {
return t.div({ className: "field-help" }, props.field.help);
}
},
);
}