Date Picker

Date Picker

A Date Picker component that allows users to select dates.


Installation

npx react-nex add DatePicker

Example

Range Date Picker

Select the range of the date


Date And Time Picker

Select the date and time both.


Props

onSelect

  • Type: (date: string) => void
  • Description: Callback function that is called when a date is selected. The selected date is passed as a string in the format Fri May 31 2024.

selected

  • Type: string
  • Description: The initially selected date. This should be a string.

mode

  • Type: string
  • Description: The default mode is single. Can be set to range for selecting the range of date.