Merge pull request #884 from popod/fix-unwanted-appointment-date-changes

Fix appointment date wrongly updated to current date in some case
This commit is contained in:
Alex Tselegidis 2020-09-11 09:50:42 +03:00 committed by GitHub
commit 3079c513a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1533,10 +1533,10 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
// Set the start and end datetime of the appointment.
var startDatetime = Date.parseExact(appointment.start_datetime, 'yyyy-MM-dd HH:mm:ss');
$dialog.find('#start-datetime').val(GeneralFunctions.formatDate(startDatetime, GlobalVariables.dateFormat, true));
$dialog.find('#start-datetime').datetimepicker('setDate', startDatetime);
var endDatetime = Date.parseExact(appointment.end_datetime, 'yyyy-MM-dd HH:mm:ss');
$dialog.find('#end-datetime').val(GeneralFunctions.formatDate(endDatetime, GlobalVariables.dateFormat, true));
$dialog.find('#end-datetime').datetimepicker('setDate', endDatetime);
var customer = appointment.customer;
$dialog.find('#customer-id').val(appointment.id_users_customer);