Skip to content

Commit

Permalink
feat(holidays): added basic holiday view
Browse files Browse the repository at this point in the history
  • Loading branch information
varijkapil13 committed Mar 12, 2019
1 parent 11c619e commit 7352d39
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion client/src/components/application/Holidays/Holidays.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@ import '../../../helpers/styles/react-big-calendar.css';

const localize = BigCalendar.momentLocalizer(moment);
const Holidays = props => {
return <BigCalendar localizer={localize} events={props.holidays} startAccessor="start" endAccessor="end" defaultView={'month'} />;
const handleEventClick = event => {
console.log(event);
};

return (
<BigCalendar
popup
localizer={localize}
events={props.holidays}
startAccessor="start"
endAccessor="end"
defaultView={'month'}
views={['month', 'work_week']}
onSelectEvent={handleEventClick}
/>
);
};

const mapStateToProps = state => {
Expand Down

0 comments on commit 7352d39

Please sign in to comment.