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
1 changed files with 1 additions and 1 deletions

View File

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