|
@@ -320,15 +320,19 @@
|
|
|
},
|
|
|
onDateChange: function (_newDate) {
|
|
|
let self = this;
|
|
|
- self.selectedDate = _newDate;
|
|
|
- showMask();
|
|
|
- this.loadEvents(self.selectedDate, function() {
|
|
|
- hideMask();
|
|
|
- Vue.nextTick(() => {
|
|
|
- this.highlightDatesWithEvents(this.datesWithEvents);
|
|
|
- initFastLoad($('.appointments-tab'));
|
|
|
+ window.setTimeout(() => {
|
|
|
+ let dayValue = $('.pro-dashboard-inline-calendar td.day.active').first().text();
|
|
|
+ if(dayValue.length === 1) dayValue = '0' + dayValue;
|
|
|
+ self.selectedDate = _newDate.substr(0, 8) + dayValue;
|
|
|
+ showMask();
|
|
|
+ self.loadEvents(self.selectedDate, function() {
|
|
|
+ hideMask();
|
|
|
+ Vue.nextTick(() => {
|
|
|
+ self.highlightDatesWithEvents(self.datesWithEvents);
|
|
|
+ initFastLoad($('.appointments-tab'));
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ }, 25);
|
|
|
},
|
|
|
selectToday: function () {
|
|
|
$('.pro-dashboard-inline-calendar table td[data-date]').removeClass('active');
|
|
@@ -421,9 +425,7 @@
|
|
|
},
|
|
|
loadEvents: function(_date, _callback) {
|
|
|
let self = this;
|
|
|
- $.get('/pro-dashboard-events/' +
|
|
|
- this.formatDate(_date) + '/' +
|
|
|
- this.formatDate(_date), function(_data) {
|
|
|
+ $.get('/pro-dashboard-events/' + _date + '/' + _date, function(_data) {
|
|
|
self.events = _data;
|
|
|
self.numEventsForDate = (_data && _data.length) ? 1 : 0;
|
|
|
_callback.call(self);
|