From 6bf3e5bdd527fd64ef4bd617030431a456b5f227 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sun, 13 Dec 2015 22:03:30 +0100 Subject: [PATCH] Added dynamic date format support for the backend/customers page. --- src/assets/js/backend_customers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/assets/js/backend_customers.js b/src/assets/js/backend_customers.js index c09ff712..6e510baf 100644 --- a/src/assets/js/backend_customers.js +++ b/src/assets/js/backend_customers.js @@ -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 = '
' + start + ' - ' + end + '
' + @@ -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 = '
' +