components
DateTimeField
Este conteúdo não está disponível em sua língua ainda.
import { DateTimeField } from "@rebasepro/ui";| Prop | Type | Required | Description |
|---|---|---|---|
value |
Date |
— | |
onChange |
(date: Date | null) => void |
— | |
mode |
DateTimeFieldMode |
— | What the field picks: a day, a day and a time, or a time of day alone. A time of day is a Date on 1970-01-01 — how a time column travels — read and written in timezone. |
disabled |
boolean |
— | |
clearable |
boolean |
— | |
error |
boolean |
— | |
size |
"small" | "smallest" | "medium" | "large" |
— | |
label |
React.ReactNode |
— | |
className |
string |
— | |
style |
React.CSSProperties |
— | |
inputClassName |
string |
— | |
invisible |
boolean |
— | |
locale |
string |
— | BCP 47 locale, set as the input’s lang. The browser still draws a native date input in its own UI language; this is the hint it may use. |
timezone |
string |
— | IANA timezone string (e.g., “America/New_York”, “Europe/London”). Used to display and input dates in the specified timez |
Example
Section titled “Example”This is the example the design-system sync renders and verifies for this component.
import { DateTimeField } from "@rebasepro/ui";
export const Modes = () => ( <div className="flex flex-col gap-3 w-[320px] p-4"> <DateTimeField mode="date" label="Published on" value={new Date("2026-07-31")} onChange={() => {}}/> <DateTimeField mode="date_time" label="Scheduled for" value={new Date("2026-07-31T14:30:00")} onChange={() => {}}/> </div>);