Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    DatePicker

    DatePicker lets users select a date.

    View source code
    • Usage
    • Props
    • onChange
      (newDate?: Date) => void

      Handler that is called when the value changes.

    • value
      Date

      The current value.

    • className
      string

      className for the element

    • fit
      "content" | "parent"

      Whether the DatePicker should fit its parents or content

      Default: content
    • id
      string

      id for the DatePicker input. Used it with htmlFor props from FormField

    • isDisabled
      boolean

      Whether the DatePicker is disabled.

      Default: false
    • isInvalid
      boolean

      Whether the DatePicker is invalid.

      Default: false
    • leftAddon
      ReactNode

      Left addon of the DatePicker.

    • maxDate
      Date

      The oldest date allowed by the input

    • minDate
      Date

      The earliest date allowed by the input

    • placeholder
      string

      Temporary text that occupies the DatePicker when it is empty.

    • placement
      "bottom-end" | "bottom-start" | "end-bottom" | "end-top" | "top-end" | "top-start"

      Whether the DatePicker should be aligned at the start or end of the trigger

      Default: bottom-start
    • variant
      "default" | "magicGradient"

      The visual style of the DatePicker.