DocSpace-client/packages/components/calendar
2023-03-01 16:23:42 +05:00
..
styled-components fixed line-height of weekdays 2023-03-01 15:18:09 +05:00
sub-components onChange prop was added 2023-03-01 16:23:42 +05:00
utils onChange prop was added 2023-03-01 16:23:42 +05:00
calendar.stories.js onChange prop was added 2023-03-01 16:23:42 +05:00
calendar.test.js test file was backuped 2023-02-28 12:44:32 +05:00
index.js onChange prop was added 2023-03-01 16:23:42 +05:00
README.md style prop was added 2023-02-09 15:06:47 +05:00

Calendar

Used to display custom calendar

Usage

import Calendar from "@docspace/components/calendar";
<Calendar
  onChange={(date) => {
    console.log("Selected date:", date);
  }}
  minDate={new Date("1970/01/01")}
  maxDate={new Date("3000/01/01")}
  locale="ru"
/>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
id string - - - Accepts id
locale string - - User's browser settings Browser locale
maxDate date - - new Date("3000/01/01") Maximum date that the user can select.
minDate date - - new Date("1970/01/01") Minimum date that the user can select.
onChange func - - - Function called when the user select a day
style obj, arr - - - Accepts css style