Newton's Poleless Magnet

    react-events-calendar

    1.0.0-beta.3 • Public • Published

    react-events-calendar

    Events calendar for React.

    Work in progress

    Installation

    The package can be installed via NPM

    npm install react-events-calendar --save
    

    Usage

    import ReactEventsCalendar from 'react-events-calendar';
     
    ...
     
    render() {
        <ReactEventsCalendar ref="calendar"
                             events={this.state.events}
                             onDateSelect={this.handleSelectedDate}
                             onMonthChange={this.handleMonthChange}
        />
    }

    See Examples for more details.

    Props

    • events {array} Array of events
    • defaultView {string} Default calendar view (day, week or month)
    • onDateSelect {function} Callback when a date is selected
    • onMonthChange {function} Callback when the month as changed

    API

    • getEvents(date) Return events for a given date

    Screenshots

    Month view

    Month View

    Week view

    Week View

    Day view

    Day View

    TODO

    • Highlight current day on week view
    • Jump to current hour or first event of the day on day view
    • Tests
    • Static validate

    Contributions

    When contributing, please work on the src directory.

    The following command will run webpack with watch and compile code as it changes.

    npm run dev
    

    License

    MIT

    Keywords

    none

    Install

    npm i react-events-calendar

    DownloadsWeekly Downloads

    13

    Version

    1.0.0-beta.3

    License

    MIT

    Last publish

    Collaborators

    • almeidarruben