Skip to content

YozhikM/react-dtpicker

Repository files navigation

Date Time Picker

DeepScan Grade FlowType compatible

The calendar is written using the React library. Can be used both as a common calendar, and as a date time picker with range. There is a possibility to choose a date by days, months, years and decades. The date can be changed in the input.

DateTimePicker

Usage

  1. git clone https://github.com/YozhikM/dtpicker.git
  2. npm install
  3. npm start or yarn start
  4. npm test or yarn test

API

highlight

Highlights the days.

highlight?: { min: Date, max: Date }

value

Displayed months on the calendar.

value?: { min: string, max: string }

time

When the value is set to true, the time in hours and minutes will be displayed, as well as the ability to change it. By default is false.

time?: boolean

minDate && maxDate

The latest dates for the calendar. All events, like clicking, navigating through the interface, will be unavailable.

minDate?: Date,
maxDate?: Date

singleCalendar

When set to true, a single calendar will be displayed without the ability to select a date range. By default is false.

singleCalendar?: boolean

onChange()

onChange?: (Event, { min: string, max: string }) => void;

onSubmit()

onSubmit?: (Event, { min: string, max: string }) => void;

toggleCalendar()

toggleCalendar?: () => void;

DateTimePicker

About

Date Time Picker for React

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published