DocSpace-client/packages/components/calendar
2023-03-01 15:18:09 +05:00
..
styled-components fixed line-height of weekdays 2023-03-01 15:18:09 +05:00
sub-components anonymous functions were transformned into named functions 2023-02-08 17:18:32 +05:00
utils getValidDates funciton was re-exported 2023-02-28 16:39:02 +05:00
calendar.stories.js initial date prop was added 2023-02-28 16:38:02 +05:00
calendar.test.js test file was backuped 2023-02-28 12:44:32 +05:00
index.js initial date is set to default if it is not fitting into min/max boundaries 2023-03-01 14:04:58 +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