DocSpace-buildtools/web/ASC.Web.Components/src/components/calendar-new
2019-09-13 13:45:47 +03:00
..
sub-components Web: Components: fixed moment.js warning and calendar styles 2019-09-11 09:28:46 +03:00
calendar.stories.js Web: Components: fixed moment.js warning and calendar styles 2019-09-11 09:28:46 +03:00
calendar.test.js Web: Components: fixed calendar README, fixed calendar re-render, added new test 2019-09-13 13:45:47 +03:00
index.js Web: Components: fixed calendar README, fixed calendar re-render, added new test 2019-09-13 13:45:47 +03:00
README.md Web: Components: fixed calendar README, fixed calendar re-render, added new test 2019-09-13 13:45:47 +03:00

Calendar

Description

Custom calendar

Usage

import { NewCalendar } from "asc-web-components";

<NewCalendar
  onChange={date => {
    console.log("Selected date:", date);
  }}
  disabled={false}
  themeColor="#ED7309"
  selectedDate={new Date()}
  openToDate={new Date()}
  minDate={new Date("1970/01/01")}
  maxDate={new Date("3000/01/01")}
  locale="ru"
/>;

Properties

Props Type Required Values Default Description
onChange func - - - Function called when the user select a day
isDisabled bool - - - Disabled react-calendar
themeColor string - - #ED7309 Color of the selected day
selectedDate date - - (today) Selected date value
openToDate date - - (today) The beginning of a period that shall be displayed by default
minDate date - - new Date("1970/01/01") Minimum date that the user can select.
maxDate date - - new Date("3000/01/01") Maximum date that the user can select.
locale string - - User's browser settings Browser locale