2.0.7 • Published 2 years ago

react-typescript-date-picker v2.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Date picker

Simple library with date picker and range picker components. Explore on storybook

View

calendar with todolist month calendar

Instalation

npm i react-typescript-date-picker

Provided components

<DatePicker/>
<RangePicker/>

Common Props

 type?: 'day' | 'week' | 'month';
 weekStart?: 1 | 0; // 1-Monday 2-Sunday
 showWeekends?: boolean;
 holidays?: Date[];
 minDate?: Date;
 maxDate?: Date;
 withToDoList?: boolean;
 label?: string;
 mainColor?: string;
 holidayColor?: string;
 errorColor?: string;
 size?: 'small' | 'medium' | 'large';

Date Picker Props

  defaultValue?: Date;
  onChange: (value: Date) => void;

Range Picker Props

  defaultStartDate?: Date;
  defaultEndDate?: Date;
  onChange: (date: { startDate: Date; endDate: Date }) => void;