Skip to content
العربية
Saudi forms and dates

DatePicker

A field that opens the Calendar. It posts an ISO date whatever calendar is shown.

import { DatePicker } from "@percentsa/ui";

Examples

Code
export function DatePickerExample() {
  const t = useT();
  const [day, setDay] = useState<PlainDate | null>(null);
  return (
    <Field label={t("Start date", "تاريخ البدء")} className="w-full max-w-xs">
      <DatePicker value={day} onValueChange={setDay} name="start" />
    </Field>
  );
}