Calendar
Interface
export type ICalendarTypeValue = string | null;
export interface ICalendarField extends CommonField {
type: 'calendar';
options?: {
format?: string;
};
private?: () => Promise<ICalendarTypeValue>;
render?: (v: ICalendarTypeValue) => JSX.Element;
validation?: Validation<ICalendarTypeValue>;
}Example
Basic Calendar Field
{
type: 'calendar',
name: 'YOUR_PATH',
}Email with placeholder and format
{
type: 'calendar',
name: 'YOUR_PATH',
options: {
format: 'yyyy-MM-dd'
},
validation: z.date({ message: 'Invalid date' })
}