The PlainDateInput API is experimental and may change in the future. It has been marked as @deprecated to remind the developer that it is experimental. It is not "deprecated", just experimental. Please don't use it in production versions of your app. We do not guarantee backward compatibility, or that the API will remain stable.
This component is returned by useForm().
If you wish to also get a time with your date, use <DateTimeInput />.

Example

event-form.tsx
import React from "react"
import {Forms, useForm, showToast} from "attio/client"

export function EventForm() {
  const {Form, SubmitButton, Experimental_PlainDateInput} = useForm(
    {
      eventDate: Forms.plainDate(),
    },
    {}
  )
  return (
    <Form
      onSubmit={async (values) => {
        await showToast({
          title: "Form submitted",
          variant: "success",
          text: `Event scheduled for ${values.eventDate}`,
        })
      }}
    >
      <Experimental_PlainDateInput label="Event Date" name="eventDate" />
      <SubmitButton label="Submit" />
    </Form>
  )
}

Props

label
string
required
The label of the plain date input field.
name
string
required
The path to the plainDate value of the input field in your form schema.The value will be in ISO 8601 format (YYYY-MM-DD).e.g. "event_date", "user.birth_date"
disabled
boolean
Whether or not the field should be disabled.Defaults to false (not disabled).