DateTimePicker API
import { DateTimePicker } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
allowInput | boolean | |
bare | boolean | |
clearable | boolean | |
closeOnSelect | boolean | |
defaultOpen | boolean | |
defaultValue | string | |
description | string | Helper text under the label: the same as hint, named like the other fields' prop. |
disabled | boolean | |
error | string | |
format | '24h' | '12h' | |
hint | string | |
label | string | |
locale | string | |
max | string | |
min | string | |
mode | 'popover' | 'inline' | |
name | string | |
onChange | (detail: DateTimePickerDetail) => void | |
onClose | () => void | |
onInput | (detail: DateTimePickerDetail) => void | |
onInvalid | (detail: { raw: string; reason: string }) => void | |
onOpen | () => void | |
onValueChange | (value: string | null) => void | |
open | boolean | |
readOnly | boolean | |
required | boolean | |
showFooter | boolean | |
size | 'sm' | 'md' | 'lg' | |
step | number | |
translations | Record<string, string> | string | |
value | string | |
variant | 'default' | 'contrast' | |
weekStart | 0 | 1 | 6 |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-date-time-picker>
DateTimePicker renders the ui-date-time-picker custom element from @editora/ui-core, which can also be used without React.
Attributes: allow-input, aria-describedby, aria-description, aria-label, bare, clearable, close-on-select, default-open, default-value, disabled, error, format, hint, label, locale, max, min, mode, name, open, readonly, required, shape, show-footer, size, state, step, translations, value, variant, week-start
Events: change, input, invalid