@papernote/ui
Version:
A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive
67 lines • 2.24 kB
TypeScript
export interface DateTimePickerProps {
/** Selected date-time value (ISO 8601 string) */
value?: string | null;
/** Change handler */
onChange?: (dateTime: string | null) => void;
/** Input label */
label?: string;
/** Date placeholder */
datePlaceholder?: string;
/** Time placeholder */
timePlaceholder?: string;
/** Use 12-hour time format */
use12Hour?: boolean;
/** Show seconds in time picker */
showSeconds?: boolean;
/** Minute step interval */
minuteStep?: 1 | 5 | 10 | 15 | 30;
/** Minimum selectable date */
minDate?: Date;
/** Maximum selectable date */
maxDate?: Date;
/** Disabled dates function */
disabledDates?: Date[] | ((date: Date) => boolean);
/** Locale for date formatting */
locale?: string;
/** Date format */
dateFormat?: 'short' | 'medium' | 'long';
/** Validation state */
validationState?: 'error' | 'success' | 'warning' | null;
/** Validation message */
validationMessage?: string;
/** Helper text */
helperText?: string;
/** Required field */
required?: boolean;
/** Disabled state */
disabled?: boolean;
/** Layout direction */
layout?: 'horizontal' | 'vertical';
/** Custom className */
className?: string;
/** Size variant */
size?: 'sm' | 'md' | 'lg';
}
/**
* DateTimePicker component - Combined date and time selection.
*
* Features:
* - Combines DatePicker and TimePicker
* - Supports ISO 8601 date-time strings
* - Flexible layout (horizontal/vertical)
* - All DatePicker and TimePicker features
* - Single onChange with combined value
*
* @example
* ```tsx
* <DateTimePicker
* label="Meeting Date & Time"
* value={meetingDateTime}
* onChange={setMeetingDateTime}
* use12Hour
* minuteStep={15}
* />
* ```
*/
export default function DateTimePicker({ value, onChange, label, datePlaceholder, timePlaceholder, use12Hour, showSeconds, minuteStep, minDate, maxDate, disabledDates, locale, dateFormat, validationState, validationMessage, helperText, required, disabled, layout, className, size, }: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=DateTimePicker.d.ts.map