Added dynamic date format support for the backend/customers page.
This commit is contained in:
parent
896260838a
commit
6bf3e5bdd5
1 changed files with 4 additions and 4 deletions
|
@ -348,8 +348,8 @@ CustomersHelper.prototype.display = function(customer) {
|
||||||
$('#customer-appointments').data('jsp').destroy();
|
$('#customer-appointments').data('jsp').destroy();
|
||||||
$('#customer-appointments').empty();
|
$('#customer-appointments').empty();
|
||||||
$.each(customer.appointments, function(index, appointment) {
|
$.each(customer.appointments, function(index, appointment) {
|
||||||
var start = Date.parse(appointment.start_datetime).toString('dd/MM/yyyy HH:mm');
|
var start = GeneralFunctions.formatDate(Date.parse(appointment.start_datetime), GlobalVariables.dateFormat, true),
|
||||||
var end = Date.parse(appointment.end_datetime).toString('dd/MM/yyyy HH:mm');
|
end = GeneralFunctions.formatDate(Date.parse(appointment.end_datetime), GlobalVariables.dateFormat, true);
|
||||||
var html =
|
var html =
|
||||||
'<div class="appointment-row" data-id="' + appointment.id + '">' +
|
'<div class="appointment-row" data-id="' + appointment.id + '">' +
|
||||||
start + ' - ' + end + '<br>' +
|
start + ' - ' + end + '<br>' +
|
||||||
|
@ -469,8 +469,8 @@ CustomersHelper.prototype.select = function(id, display) {
|
||||||
* @param {object} appointment Appointment data
|
* @param {object} appointment Appointment data
|
||||||
*/
|
*/
|
||||||
CustomersHelper.prototype.displayAppointment = function(appointment) {
|
CustomersHelper.prototype.displayAppointment = function(appointment) {
|
||||||
var start = Date.parse(appointment.start_datetime).toString('dd/MM/yyyy HH:mm');
|
var start = GeneralFunctions.formatDate(Date.parse(appointment.start_datetime), GlobalVariables.dateFormat, true),
|
||||||
var end = Date.parse(appointment.end_datetime).toString('dd/MM/yyyy HH:mm');
|
end = GeneralFunctions.formatDate(Date.parse(appointment.end_datetime), GlobalVariables.dateFormat, true);
|
||||||
|
|
||||||
var html =
|
var html =
|
||||||
'<div>' +
|
'<div>' +
|
||||||
|
|
Loading…
Reference in a new issue