diff --git a/src/EventEdit.tsx b/src/EventEdit.tsx index e066e18..3551f9f 100644 --- a/src/EventEdit.tsx +++ b/src/EventEdit.tsx @@ -106,7 +106,11 @@ class EventEdit extends React.Component { return; } - let event = new EventType(); + let event = (this.props.event) ? + this.props.event.clone() + : + new EventType() + ; event.uid = this.state.uid; event.summary = this.state.title; event.startDate = ICAL.Time.fromString(this.state.start); @@ -204,6 +208,11 @@ class EventEdit extends React.Component { secondary={true} /> + +