Skip to content

Date Time

Interface

export type IDateTimeTypeValue = string | null;
 
export interface IDateTimeField extends CommonField {
    type: 'date-time';
    options?: {
        placeholder?: string;
    };
    private?: () => Promise<IDateTimeTypeValue>;
    render?: (v: IDateTimeTypeValue) => JSX.Element;
    validation?: Validation<IDateTimeTypeValue>;
}

Example

  {
    type: 'date-time',
    name: 'YOUR_PATH',
    options: {
      placeholder: 'Enter your date',
    },
    validation: z.string()
  }