forked from mirrors/easyappointments
Corrected working plan parsing for foreign languages (#461).
This commit is contained in:
parent
271652c2b7
commit
7ee9f24f5a
1 changed files with 11 additions and 1 deletions
|
@ -789,6 +789,16 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
$calendar.fullCalendar('removeEvents');
|
||||
$calendar.fullCalendar('addEventSource', calendarEvents);
|
||||
|
||||
var weekDays = [
|
||||
'sunday',
|
||||
'monday',
|
||||
'tuesday',
|
||||
'wednesday',
|
||||
'thursday',
|
||||
'friday',
|
||||
'saturday'
|
||||
];
|
||||
|
||||
// :: ADD PROVIDER'S UNAVAILABLE TIME PERIODS
|
||||
var calendarView = $calendar.fullCalendar('getView').name;
|
||||
|
||||
|
@ -800,7 +810,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
|
||||
switch (calendarView) {
|
||||
case 'agendaDay':
|
||||
var selectedDayName = $calendar.fullCalendar('getView').start.format('dddd').toLowerCase();
|
||||
var selectedDayName = weekDays[$calendar.fullCalendar('getView').start.format('d')];
|
||||
|
||||
// Add custom unavailable periods.
|
||||
$.each(response.unavailables, function (index, unavailable) {
|
||||
|
|
Loading…
Reference in a new issue