1.2.4 • Published 2 years ago
jwf-year-calendar v1.2.4
jwf-year-calendar
A full react version of Paul-DS' js-year-calendar, https://github.com/year-calendar/js-year-calendar. Built with support from JWF Process Solutions Ltd.

Installation
- From the Node package manager, using the following command:
npm install jwf-year-calendarornpm i jwf-year-calendar - From Yarn, using the following command:
yarn add jwf-year-calendar
Usage
The calendar can be created using the following javascript code :
import Calendar from 'jwf-year-calendar';
render() {
return (<Calendar />);
}Using options
You can specify props to customize the calendar for your needs:
render() {
return (
<Calendar enableRangeSelection={true} weekStart={0}/>
);
}The props are as follows
| Option name | Description | Type | Default value |
|---|---|---|---|
| contextMenuItems | Specifies the items of the default context menu. This returns a callback function | array | [] |
| dataSource | The elements that must be displayed on the calendar. | array or function | [] |
| disabledDays | The days that must be displayed as disabled. | array | [] |
| enableRangeSelection | Specifies whether the range selection is enabled. | boolean | false |
| weekStart | The starting day of the week. This option overrides the parameter define in the language file. | number | 0 |
| darkMode | Allows user to select if they want the contextmenu and day tile to display in dark mode or not | boolean | 'false' |
| Event name | Description | Parameter |
|---|---|---|
| onRangeSelected | Function fired when a date range is selected. | { startDate, endDate } |
| onYearChange | Function fired when the visible year of the calendar is changed. | { currentYear } |
1.2.4
2 years ago
1.2.0
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.1.5
2 years ago
1.2.3
2 years ago
1.1.4
2 years ago
1.2.2
2 years ago
1.1.3
2 years ago
1.2.1
2 years ago
1.1.2
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago