mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-09 06:38:52 +00:00
* commit first * Update README.md * Update README.md * first commit * Change Docs * Update README.md * Update README.md * Update Calendar Web Part * Update README.md * Update README.md * Update Docs * Update - Suport Create Event in SiteTimeZone * update Docs * update docs * Update comments * upd default start/end dates on prop panel * update Prop * upd default props panel * upd comments
31 lines
1023 B
JavaScript
31 lines
1023 B
JavaScript
import React from 'react';
|
|
import Toolbar from 'react-big-calendar/lib/Toolbar';
|
|
|
|
export default class CalendarToolbar extends Toolbar {
|
|
|
|
componentDidMount() {
|
|
const view = this.props.view;
|
|
console.log(view)
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div>
|
|
<div className="rbc-btn-group">
|
|
<button type="button" onClick={() => this.navigate('TODAY')}>today</button>
|
|
<button type="button" onClick={() => this.navigate('PREV')}>back</button>
|
|
<button type="button" onClick={() => this.navigate('NEXT')}>next</button>
|
|
</div>
|
|
<div className="rbc-toolbar-label">{this.props.label}</div>
|
|
<div className="rbc-btn-group">
|
|
<button type="button" onClick={this.view.bind(null, 'month')}>Month</button>
|
|
<button type="button" onClick={this.view.bind(null, 'week')}>Week</button>
|
|
<button type="button" onClick={this.view.bind(null, 'day')}>Day</button>
|
|
<button type="button" onClick={this.view.bind(null, 'agenda')}>Agenda</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
module.export = CalendarToolbar;
|