mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 16:02:54 +03:00
Fix appointment date wrongly updated to current date when the modal is open from the /backend/index/<appointment hash> url
This commit is contained in:
parent
2f1367fc35
commit
9d1dda3806
1 changed files with 2 additions and 2 deletions
|
@ -1533,10 +1533,10 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
|
|
||||||
// Set the start and end datetime of the appointment.
|
// Set the start and end datetime of the appointment.
|
||||||
var startDatetime = Date.parseExact(appointment.start_datetime, 'yyyy-MM-dd HH:mm:ss');
|
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');
|
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;
|
var customer = appointment.customer;
|
||||||
$dialog.find('#customer-id').val(appointment.id_users_customer);
|
$dialog.find('#customer-id').val(appointment.id_users_customer);
|
||||||
|
|
Loading…
Reference in a new issue