diff --git a/packages/client/src/components/app/forms/DateTimeField.svelte b/packages/client/src/components/app/forms/DateTimeField.svelte index 022a634bc5..1010883cad 100644 --- a/packages/client/src/components/app/forms/DateTimeField.svelte +++ b/packages/client/src/components/app/forms/DateTimeField.svelte @@ -10,9 +10,17 @@ export let timeOnly = false export let validation export let defaultValue + export let onChange let fieldState let fieldApi + + const handleChange = e => { + fieldApi.setValue(e.detail) + if (onChange) { + onChange({ value: e.detail }) + } + } fieldApi.setValue(e.detail)} + on:change={handleChange} disabled={fieldState.disabled} error={fieldState.error} id={fieldState.fieldId}