|
|
|
@ -63,6 +63,7 @@ class EventEdit extends React.PureComponent {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const locState = this.props.location.state;
|
|
|
|
|
if (locState) {
|
|
|
|
|
// FIXME: Hack to determine if all day. Should be passed as a proper state.
|
|
|
|
|
this.state.allDay = (locState.start &&
|
|
|
|
|
(locState.start.getHours() === 0) &&
|
|
|
|
@ -71,6 +72,7 @@ class EventEdit extends React.PureComponent {
|
|
|
|
|
(locState.start.getMinutes() === locState.end.getMinutes()));
|
|
|
|
|
this.state.start = (locState.start) ? locState.start : undefined;
|
|
|
|
|
this.state.end = (locState.end) ? locState.end : undefined;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.props.item !== undefined) {
|
|
|
|
|
const event = this.props.item;
|
|
|
|
|