MantineDateInput#

@palmyralabs/rt-forms-mantine · form/MantineDateInput.tsx

Overview#

Text-style date input with an inline popover calendar. Stores the value in serverPattern, renders it in displayPattern.

Props — IDatePickerDefinition & DateInputProps#

Common field props plus:

Prop Type Purpose
serverPattern string? Wire format (e.g. YYYY-MM-DD) — what gets saved
displayPattern string? UI format (e.g. DD MMM YYYY) — what the user sees

Plus Mantine DateInputProps (minDate, maxDate, clearable, firstDayOfWeek, …).

Ref — IDateField#

interface IDateField {
  focus(): void;
  getValue(): any;
  setValue(v: any): void;
  isValid(): boolean;
}

Example#

<MantineDateInput
  attribute="invoiceDate"
  label="Invoice date"
  serverPattern="YYYY-MM-DD"
  displayPattern="DD MMM YYYY"
  clearable
/>