I'm having issues with the library moment.js because I'm trying to update events in Fullcalendar but the eventUpdate is not working well with the start option without reloading page. I've made an addEventListener inside an anchor => document.getElementById('button\_edit').addEventListener("click", editControl)that calls a function (editControl) to update the event. This function first updates the event by sending an ajax post with the new properties and then is supposed to update the view => $('#calendar').fullCalendar('updateEvent', y) without the need of reloading page. It works well with the title param but it doesn't work with the start param. I know the start param in Fullcalendar is built with the library moment.js so I do y.start=moment(document.getElementById('control\_day\_edit').value). If I do console.log(y.start) the console gives me a Moment with the datetime updated propperly, but then I do console.log(y) and the console gives me the event object with the original start param instead of the new. I've noticed that the format is a little bit different in the first case => Moment {\_isAMomentObject: true, \_i: "19-01-2015 08:27 PM/P1", \_isUTC: false, \_pf: Object, \_locale: Locale…}, and in the event object => "01/19/2015 04:27 PM" so I've tried to format the date but the console gives me invalid date, so I don't know how to update the start param in the event wihtout reloading page.

This is my code 

```
         events: allControls(controls), 

         eventClick: function(calEvent, jsEvent, view) {
                    x=calEvent.id;
                $('#modalTitle').html(calEvent.title);
                console.log(calEvent.start);
                    $('#control_day_edit').val(moment(calEvent.start._i).format("DD-MM-YYYY hh:mm A/PM"));

                $('#control_level').val(calEvent.title.toString());
                    console.log(calEvent)
                    console.log(calEvent.title)
                    console.log(calEvent.start._i)
                    console.log(calEvent.id)
                $('#eventUrl').attr('href',"/users/:user_id/controls/calEvent.id/edit");
                $('#fullCalModal').modal();
                y=calEvent;

            }
})
}

```

});

```
document.getElementById('button_edit').addEventListener("click", editControl);

 function editControl(event) {
     event.preventDefault();
     var controlEdited = {
         "level": document.getElementById('control_level').value,
         "day": document.getElementById('control_day_edit').value,
         "period": document.getElementById('control_period').value,
         "id": x
    }
    $.post("/editControls", JSON.stringify(controlEdited));
    y.title = document.getElementById('control_level').value;
    y.start = moment(document.getElementById('control_day_edit').value).format("MM-DD-YYYY hh:mm A/PM");
    console.log(y.start);
    console.log(y.title);
    console.log(y);
    $('#calendar').fullCalendar('updateEvent', y);
    };

```