1.2.4 • Published 6 months ago

jwf-year-calendar v1.2.4

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
6 months ago

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.

npm.io

Installation

  • From the Node package manager, using the following command: npm install jwf-year-calendar or npm 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 nameDescriptionTypeDefault value
contextMenuItemsSpecifies the items of the default context menu. This returns a callback functionarray[]
dataSourceThe elements that must be displayed on the calendar.array or function[]
disabledDaysThe days that must be displayed as disabled.array[]
enableRangeSelectionSpecifies whether the range selection is enabled.booleanfalse
weekStartThe starting day of the week. This option overrides the parameter define in the language file.number0
darkModeAllows user to select if they want the contextmenu and day tile to display in dark mode or notboolean'false'
Event nameDescriptionParameter
onRangeSelectedFunction fired when a date range is selected.{ startDate, endDate }
onYearChangeFunction fired when the visible year of the calendar is changed.{ currentYear }
1.2.4

6 months ago

1.2.0

7 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.1.5

7 months ago

1.2.3

7 months ago

1.1.4

7 months ago

1.2.2

7 months ago

1.1.3

7 months ago

1.2.1

7 months ago

1.1.2

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago