Tutorial out of date
Closed this issue · 2 comments
joelklint commented
Hi,
I'm trying out the calendar but cant get it too work. It renders without any problem but the result is not as expected. I am not sure whether something is broken or I have just missed something. I am using React 15.0.2.
I have tried both copy pasting the tutorial and rewriting it using ES6 syntax. Currently my code looks like this:
import React from 'react';
import Dayz from 'dayz';
import moment from 'moment';
export default class TestDayz extends React.Component {
constructor(props) {
super();
const events = new Dayz.EventsCollection([
{ content: 'A short event',
range: moment.range( moment(), moment().add(1, 'day') )
}
]);
this.state = {events}
}
render() {
return (
<Dayz
date={moment()}
events={this.state.events}
/>
)
}
}
RobbyRob81 commented
Connect the CSS file from the Dayz node_module directory.
joelklint commented
Excellent, thanks!