Replaced "getDate" method call with Date.parse (fixes #220).

This commit is contained in:
alextselegidis 2016-10-23 21:40:32 +02:00
parent 81b3eb9bd3
commit b7fab97b92

View file

@ -288,7 +288,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
// Automatically update the service duration.
$.each(GlobalVariables.availableServices, function(indexService, service) {
if (service.id == sid) {
var start = $('#start-datetime').datepicker('getDate');
var start = Date.parse($('#start-datetime').val());
$('#end-datetime').datepicker('setDate', new Date(start.getTime() + service.duration * 60000));
return false; // break loop
}