From b7fab97b92eb497f48f9f0eb84ab6a98508c6308 Mon Sep 17 00:00:00 2001 From: alextselegidis Date: Sun, 23 Oct 2016 21:40:32 +0200 Subject: [PATCH] Replaced "getDate" method call with Date.parse (fixes #220). --- src/assets/js/backend_calendar_appointments_modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/js/backend_calendar_appointments_modal.js b/src/assets/js/backend_calendar_appointments_modal.js index d479415c..1e1f3c52 100644 --- a/src/assets/js/backend_calendar_appointments_modal.js +++ b/src/assets/js/backend_calendar_appointments_modal.js @@ -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 }