fix variable passed to end date when editing an event.