diff --git a/src/assets/js/backend_calendar_table_view.js b/src/assets/js/backend_calendar_table_view.js index 2addf00c..159c6973 100644 --- a/src/assets/js/backend_calendar_table_view.js +++ b/src/assets/js/backend_calendar_table_view.js @@ -401,6 +401,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; function _createView(startDate, endDate) { $('#calendar .calendar-view').remove(); + var displayDate = startDate.getTime() !== endDate.getTime(); var $calendarView = $('
').appendTo('#calendar'); $calendarView.data({ @@ -419,7 +420,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; var currentDate = startDate; while(currentDate <= endDate) { - _createDateColumn($wrapper, currentDate, response); + _createDateColumn($wrapper, currentDate, response, displayDate); currentDate.add({days: 1}); } @@ -436,13 +437,16 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; * @param {jQuery} $wrapper The wrapper div element of the table view. * @param {Date} date Selected date for the column. * @param {Object[]} events Events to be displayed on this date. + * @param {Boolean} displayDate Whether to display the date in the column container. */ - function _createDateColumn($wrapper, date, events) { + function _createDateColumn($wrapper, date, events, displayDate) { var $dateColumn = $('').appendTo($wrapper); - $dateColumn - .data('date', date.getTime()) - .append('