interface InputDateProps {
    className?: string;
    datePicker?: "manual" | "infer" | "native";
    errorText?: string;
    isDisabled?: boolean;
    isRequired?: boolean;
    label?: string;
    labelWeight?: "bold" | "regular";
    maxDate?: string;
    minDate?: string;
    name?: string;
    onChange?: ((value, name?) => void);
    placeholder?: string;
    showTodayButton?: boolean;
    value?: null | string;
}

Properties

className?: string

Custom class to give the html component

datePicker?: "manual" | "infer" | "native"

Configure what should be used for the date picking logic

  • 'infer' will use native date picker if supported, otherwise manual (default)
  • 'native' will use native date picker
  • 'manual' will use manual date picker (popover)
errorText?: string

Error text

isDisabled?: boolean

Is input disabled

isRequired?: boolean

Shows red required mark

label?: string

Label of the input field

labelWeight?: "bold" | "regular"

Configurable label weight

maxDate?: string

Maximum date allowed to be selected (yyyy-mm-dd)

minDate?: string

Minimum date allowed to be selected (yyyy-mm-dd)

name?: string

Input name

onChange?: ((value, name?) => void)

On selected date change callback

Type declaration

    • (value, name?): void
    • On selected date change callback

      Parameters

      • value: null | string
      • Optional name: string

      Returns void

placeholder?: string

Placeholder

showTodayButton?: boolean

Default: true; Will show a button for selecting today in the popover

value?: null | string

Input value (value is a string in format yyyy-mm-dd) If a value not in that format is entered then the input will change to null.

Generated using TypeDoc