Added dynamic date format support for the backend/customers page.

This commit is contained in:
Alex Tselegidis 2015-12-13 22:03:30 +01:00
parent 896260838a
commit 6bf3e5bdd5

View file

@ -348,8 +348,8 @@ CustomersHelper.prototype.display = function(customer) {
$('#customer-appointments').data('jsp').destroy();
$('#customer-appointments').empty();
$.each(customer.appointments, function(index, appointment) {
var start = Date.parse(appointment.start_datetime).toString('dd/MM/yyyy HH:mm');
var end = Date.parse(appointment.end_datetime).toString('dd/MM/yyyy HH:mm');
var start = GeneralFunctions.formatDate(Date.parse(appointment.start_datetime), GlobalVariables.dateFormat, true),
end = GeneralFunctions.formatDate(Date.parse(appointment.end_datetime), GlobalVariables.dateFormat, true);
var html =
'<div class="appointment-row" data-id="' + appointment.id + '">' +
start + ' - ' + end + '<br>' +
@ -469,8 +469,8 @@ CustomersHelper.prototype.select = function(id, display) {
* @param {object} appointment Appointment data
*/
CustomersHelper.prototype.displayAppointment = function(appointment) {
var start = Date.parse(appointment.start_datetime).toString('dd/MM/yyyy HH:mm');
var end = Date.parse(appointment.end_datetime).toString('dd/MM/yyyy HH:mm');
var start = GeneralFunctions.formatDate(Date.parse(appointment.start_datetime), GlobalVariables.dateFormat, true),
end = GeneralFunctions.formatDate(Date.parse(appointment.end_datetime), GlobalVariables.dateFormat, true);
var html =
'<div>' +