2019-08-20 13:27:24 +00:00
|
|
|
# Calendar
|
2019-08-08 13:16:08 +00:00
|
|
|
|
|
|
|
#### Description
|
|
|
|
|
|
|
|
Custom date input
|
|
|
|
|
|
|
|
#### Usage
|
|
|
|
|
|
|
|
```js
|
2019-08-20 08:52:44 +00:00
|
|
|
import { Calendar } from 'asc-web-components';
|
|
|
|
|
|
|
|
<Calendar
|
|
|
|
onChange={date => {
|
|
|
|
console.log(date);
|
|
|
|
}}
|
|
|
|
disabled={false}
|
|
|
|
themeColor='#ED7309'
|
|
|
|
selectedDate={new Date()}
|
|
|
|
openToDate={new Date()}
|
|
|
|
minDate={new Date("2018/02/01")}
|
|
|
|
maxDate={new Date("2019/09/01")}
|
|
|
|
language='en'
|
|
|
|
size = 'big'
|
|
|
|
/>
|
2019-08-08 13:16:08 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Properties
|
|
|
|
|
2019-08-20 08:52:44 +00:00
|
|
|
http://projects.wojtekmaj.pl/react-calendar/
|
2019-08-08 13:16:08 +00:00
|
|
|
|
|
|
|
| Props | Type | Required | Values | Default | Description |
|
|
|
|
| ------------ | -------- | :------: | ------ | ------- | --------------------------------------- |
|
2019-08-20 08:52:44 +00:00
|
|
|
| `onChange` | `func` | - | - | - | Function called when the user select a day |
|
|
|
|
| `disabled` | `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. |
|
|
|
|
| `language` | `string` | - | - | User's browser settings | Indicates the input field has an error |
|
|
|
|
| `size` | `oneOf` | - | `base, big` | `base` | Selected calendar size |
|