Skip to main content

⚙️ Date Field

PropTypeDefaultDescription
refReact.RefProvides direct access to the date input field, enabling actions like focusing or reading the selected date programmatically.
valueDate | Moment | nullnullThe currently selected date.
defaultValueDate | Moment | nullnullUncontrolled selected date.
formatstring"YYYY/MM/DD"Specifies the format pattern used to display and interpret dates.
clearablebooleantrueEnables a UI control to clear the selected date, resetting the input.
showIconbooleantrueToggles visibility of the calendar icon in the calendar input.
readOnlybooleanPrevents manual input/editing but still allows interaction (e.g. calendar popover).
disabledbooleanFully disables the component—no input, no interaction, and typically styled as inactive.
renderIcon(onClick: () => void) => ReactNodeA function that returns a custom calendar icon element, replacing the default icon.
onChange(date: Date |null) => voidCalled when the selected date changes. Receives the new value.
onInputChange(date: Date |null) => voidCalled whenever the input value changes. Receives the raw string entered.
onOpenRequest(e: HTMLElement | boolean | null) => voidCalled when the calendar or popover requests to open. Useful for controlled components.