Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-schedule

Package Overview
Dependencies
Maintainers
2
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-schedule - npm Package Compare versions

Comparing version 16.4.40-beta to 16.4.42

src/schedule/base/calendar-util.d.ts

8

CHANGELOG.md

@@ -9,2 +9,10 @@ # Changelog

- Provided support to display Scheduler in Islamic calendar mode.
## 16.4.40-beta (2018-12-10)
### Schedule
#### New Features
- A specific time range can be blocked on Scheduler now, to prevent the creation of appointments in that time slot.

@@ -11,0 +19,0 @@ - Specific events can be made read-only, restricting any CRUD actions.

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-schedule",
"version": "16.4.40-beta",
"version": "16.4.42",
"author": "Syncfusion Inc.",

@@ -10,11 +10,11 @@ "license": "SEE LICENSE IN license",

"dependencies": {
"@syncfusion/ej2-base": "~16.4.40-beta",
"@syncfusion/ej2-data": "~16.4.40-beta",
"@syncfusion/ej2-popups": "~16.4.40-beta",
"@syncfusion/ej2-calendars": "~16.4.40-beta",
"@syncfusion/ej2-navigations": "~16.4.40-beta",
"@syncfusion/ej2-dropdowns": "~16.4.40-beta",
"@syncfusion/ej2-buttons": "~16.4.40-beta",
"@syncfusion/ej2-inputs": "~16.4.40-beta",
"@syncfusion/ej2-lists": "~16.4.40-beta"
"@syncfusion/ej2-base": "~16.4.42",
"@syncfusion/ej2-data": "~16.4.42",
"@syncfusion/ej2-popups": "~16.4.42",
"@syncfusion/ej2-calendars": "~16.4.42",
"@syncfusion/ej2-navigations": "~16.4.42",
"@syncfusion/ej2-dropdowns": "~16.4.42",
"@syncfusion/ej2-buttons": "~16.4.42",
"@syncfusion/ej2-inputs": "~16.4.42",
"@syncfusion/ej2-lists": "~16.4.42"
},

@@ -21,0 +21,0 @@ "devDependencies": {

@@ -283,7 +283,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';

var isBlockAlert = false;
var fields = this.parent.eventFields;
eventCollection.forEach(function (event) {
var dataCol = [];
if (!isNullOrUndefined(event[_this.parent.eventFields.recurrenceRule])) {
var parentObj = _this.parent.eventBase.getRecurrenceEvent(event);
dataCol = _this.parent.eventBase.generateOccurrence(parentObj || event);
if (!isNullOrUndefined(event[fields.recurrenceRule]) && isNullOrUndefined(event[fields.recurrenceID])) {
dataCol = _this.parent.eventBase.generateOccurrence(event);
}

@@ -290,0 +290,0 @@ else {

@@ -27,3 +27,3 @@ import { Schedule } from '../base/schedule';

/** @hidden */
selectCells(isMultiple: boolean, target: HTMLTableCellElement): void;
selectCells(isMultiple: boolean, targetCell: HTMLTableCellElement): void;
private selectAppointment;

@@ -30,0 +30,0 @@ private selectAppointmentElementFromWorkCell;

@@ -261,4 +261,5 @@ import { KeyboardEvents, closest, EventHandler, extend } from '@syncfusion/ej2-base';

/** @hidden */
KeyboardInteraction.prototype.selectCells = function (isMultiple, target) {
KeyboardInteraction.prototype.selectCells = function (isMultiple, targetCell) {
this.parent.removeSelectedClass();
var target = (targetCell instanceof Array) ? targetCell.slice(-1)[0] : targetCell;
if (isMultiple) {

@@ -265,0 +266,0 @@ var initialId = void 0;

@@ -384,1 +384,10 @@ import { BaseEventArgs } from '@syncfusion/ej2-base';

}
/** @hidden */
export interface StateArgs {
isRefresh: boolean;
isResource: boolean;
isView: boolean;
isDate: boolean;
isLayout: boolean;
isDataManager: boolean;
}

@@ -583,6 +583,7 @@ import { extend, isNullOrUndefined, createElement, EventHandler, addClass, append, removeClass, remove, closest, classList } from '@syncfusion/ej2-base';

if (startHour) {
dateSlot.startHour = this.parent.globalize.parseDate(startHour, { skeleton: 'Hm' });
dateSlot.startHour =
this.parent.globalize.parseDate(startHour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
}
if (endHour) {
dateSlot.endHour = this.parent.globalize.parseDate(endHour, { skeleton: 'Hm' });
dateSlot.endHour = this.parent.globalize.parseDate(endHour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
}

@@ -623,3 +624,3 @@ if (groupOrder) {

}
this.lastResourceLevel = headerLevels.slice(-1)[0];
this.lastResourceLevel = headerLevels.slice(-1)[0] || [];
if (!this.parent.activeViewOptions.group.byDate) {

@@ -692,3 +693,5 @@ var index = 0;

var data = this.resourceCollection[index].dataSource[0];
setValues(index, this.resourceCollection[index].field, data[this.resourceCollection[index].idField]);
if (data) {
setValues(index, this.resourceCollection[index].field, data[this.resourceCollection[index].idField]);
}
}

@@ -695,0 +698,0 @@ }

@@ -1,2 +0,2 @@

import { Component, ModuleDeclaration, Property, Event, Animation, Collection } from '@syncfusion/ej2-base';import { EventHandler, EmitType, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, INotifyPropertyChanged, Complex } from '@syncfusion/ej2-base';import { removeClass, addClass, classList, remove } from '@syncfusion/ej2-base';import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';import { HeaderRenderer } from '../renderer/header-renderer';import { Scroll } from '../actions/scroll';import { ScheduleTouch } from '../actions/touch';import { KeyboardInteraction } from '../actions/keyboard';import { Data } from '../actions/data';import { View, CurrentAction, ReturnType } from '../base/type';import { EventBase } from '../event-renderer/event-base';import { QuickPopups } from '../popups/quick-popups';import { EventTooltip } from '../popups/event-tooltip';import { EventWindow } from '../popups/event-window';import { Render } from '../renderer/renderer';import { Day } from '../renderer/day';import { Week } from '../renderer/week';import { WorkWeek } from '../renderer/work-week';import { Month } from '../renderer/month';import { Agenda } from '../renderer/agenda';import { MonthAgenda } from '../renderer/month-agenda';import { TimelineViews } from '../renderer/timeline-view';import { TimelineMonth } from '../renderer/timeline-month';import { WorkHours } from '../models/work-hours';import { TimeScale } from '../models/time-scale';import { QuickInfoTemplates } from '../models/quick-info-templates';import { HeaderRows } from '../models/header-rows';import { Crud } from '../actions/crud';import { Resize } from '../actions/resize';import { DragAndDrop } from '../actions/drag';import { VirtualScroll } from '../actions/virtual-scroll';import { WorkHoursModel, ViewsModel, EventSettingsModel, GroupModel, ResourcesModel, TimeScaleModel } from '../models/models';import { QuickInfoTemplatesModel, HeaderRowsModel } from '../models/models';import { EventSettings } from '../models/event-settings';import { Group } from '../models/group';import { Resources } from '../models/resources';import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss } from '../base/interface';import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges } from '../base/interface';import { ResourceBase } from '../base/resource';import * as events from '../base/constant';import * as cls from '../base/css-constant';import * as util from '../base/util';
import { Component, ModuleDeclaration, Property, Event, Animation, Collection } from '@syncfusion/ej2-base';import { EventHandler, EmitType, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, INotifyPropertyChanged, Complex } from '@syncfusion/ej2-base';import { removeClass, addClass, classList, remove } from '@syncfusion/ej2-base';import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';import { HeaderRenderer } from '../renderer/header-renderer';import { Scroll } from '../actions/scroll';import { ScheduleTouch } from '../actions/touch';import { KeyboardInteraction } from '../actions/keyboard';import { Data } from '../actions/data';import { View, CurrentAction, ReturnType, CalendarType } from '../base/type';import { EventBase } from '../event-renderer/event-base';import { QuickPopups } from '../popups/quick-popups';import { EventTooltip } from '../popups/event-tooltip';import { EventWindow } from '../popups/event-window';import { Render } from '../renderer/renderer';import { Day } from '../renderer/day';import { Week } from '../renderer/week';import { WorkWeek } from '../renderer/work-week';import { Month } from '../renderer/month';import { Agenda } from '../renderer/agenda';import { MonthAgenda } from '../renderer/month-agenda';import { TimelineViews } from '../renderer/timeline-view';import { TimelineMonth } from '../renderer/timeline-month';import { WorkHours } from '../models/work-hours';import { TimeScale } from '../models/time-scale';import { QuickInfoTemplates } from '../models/quick-info-templates';import { HeaderRows } from '../models/header-rows';import { Crud } from '../actions/crud';import { Resize } from '../actions/resize';import { DragAndDrop } from '../actions/drag';import { VirtualScroll } from '../actions/virtual-scroll';import { WorkHoursModel, ViewsModel, EventSettingsModel, GroupModel, ResourcesModel, TimeScaleModel } from '../models/models';import { QuickInfoTemplatesModel, HeaderRowsModel } from '../models/models';import { EventSettings } from '../models/event-settings';import { Group } from '../models/group';import { Resources } from '../models/resources';import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss } from '../base/interface';import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges, StateArgs } from '../base/interface';import { ResourceBase } from '../base/resource';import * as events from '../base/constant';import * as cls from '../base/css-constant';import * as util from '../base/util';import { CalendarUtil, Gregorian, Islamic } from './calendar-util';
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -86,2 +86,10 @@

/**
* It allows the Scheduler to display in other calendar modes.
* By default, Scheduler is displayed in `Gregorian` calendar mode.
* To change the mode, you can set either `Gregorian` or `Islamic` as a value to this `calendarMode` property.
* @default 'Gregorian'
*/
calendarMode?: CalendarType;
/**
* When set to `false`, it hides the weekend days of a week from the Schedule. The days which are not defined in the working days

@@ -88,0 +96,0 @@ * collection are usually treated as weekend days.

@@ -10,3 +10,3 @@ import { Component, ModuleDeclaration } from '@syncfusion/ej2-base';

import { Data } from '../actions/data';
import { View, CurrentAction, ReturnType } from '../base/type';
import { View, CurrentAction, ReturnType, CalendarType } from '../base/type';
import { EventBase } from '../event-renderer/event-base';

@@ -35,2 +35,3 @@ import { QuickPopups } from '../popups/quick-popups';

import { ResourceBase } from '../base/resource';
import { CalendarUtil } from './calendar-util';
/**

@@ -108,2 +109,3 @@ * Represents the Schedule component that displays a list of events scheduled against specific date and timings,

timeFormat: string;
calendarUtil: CalendarUtil;
/**

@@ -178,2 +180,9 @@ * Sets the `width` of the Schedule component, accepting both string and number values.

/**
* It allows the Scheduler to display in other calendar modes.
* By default, Scheduler is displayed in `Gregorian` calendar mode.
* To change the mode, you can set either `Gregorian` or `Islamic` as a value to this `calendarMode` property.
* @default 'Gregorian'
*/
calendarMode: CalendarType;
/**
* When set to `false`, it hides the weekend days of a week from the Schedule. The days which are not defined in the working days

@@ -495,3 +504,5 @@ * collection are usually treated as weekend days.

private setCldrTimeFormat;
getCalendarMode(): string;
getTimeString(date: Date): string;
private setcalendarMode;
changeView(view: View, event?: Event, muteOnChange?: boolean, index?: number): void;

@@ -567,5 +578,8 @@ changeDate(selectedDate: Date, event?: Event): void;

onPropertyChanged(newProp: ScheduleModel, oldProp: ScheduleModel): void;
private propertyChangeAction;
private extendedPropertyChange;
private onGroupSettingsPropertyChanged;
private onEventSettingsPropertyChanged;
private destroyHeaderModule;
private destroyPopups;
/**

@@ -597,3 +611,3 @@ * Allows to show the spinner on schedule at the required scenarios.

*/
getCellDetails(td: Element): CellClickEventArgs;
getCellDetails(tdCol: Element | Element[]): CellClickEventArgs;
/**

@@ -600,0 +614,0 @@ * Retrieves the resource details based on the provided resource index.

@@ -47,2 +47,3 @@ var __extends = (this && this.__extends) || (function () {

import * as util from '../base/util';
import { Gregorian, Islamic } from './calendar-util';
/**

@@ -107,2 +108,3 @@ * Represents the Schedule component that displays a list of events scheduled against specific date and timings,

this.initializeDataModule();
this.element.appendChild(this.createElement('div', { className: cls.TABLE_CONTAINER_CLASS }));
this.initializeResources();

@@ -129,6 +131,9 @@ };

}
this.destroyHeaderModule();
if (this.showHeaderBar) {
this.headerModule = new HeaderRenderer(this);
}
this.element.appendChild(this.createElement('div', { className: cls.TABLE_CONTAINER_CLASS }));
if (!this.element.querySelector('.' + cls.TABLE_CONTAINER_CLASS)) {
this.element.appendChild(this.createElement('div', { className: cls.TABLE_CONTAINER_CLASS }));
}
if (Browser.isDevice || Browser.isTouch) {

@@ -138,3 +143,5 @@ this.scheduleTouchModule = new ScheduleTouch(this);

this.initializeView(this.currentView);
this.destroyPopups();
this.initializePopups();
this.unwireEvents();
this.wireEvents();

@@ -299,3 +306,3 @@ };

else {
cldrObj = (getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.days.format.' + type, cldrData));
cldrObj = (getValue('main.' + '' + this.locale + '.dates.calendars.' + this.getCalendarMode() + '.days.format.' + type, cldrData));
}

@@ -313,8 +320,19 @@ for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {

else {
this.timeFormat = (getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.timeFormats.short', cldrData));
this.timeFormat = (getValue('main.' + '' + this.locale + '.dates.calendars.' + this.getCalendarMode() + '.timeFormats.short', cldrData));
}
};
Schedule.prototype.getCalendarMode = function () {
return this.calendarMode.toLowerCase();
};
Schedule.prototype.getTimeString = function (date) {
return this.globalize.formatDate(date, { format: this.timeFormat, type: 'time' });
return this.globalize.formatDate(date, { format: this.timeFormat, type: 'time', calendar: this.getCalendarMode() });
};
Schedule.prototype.setcalendarMode = function () {
if (this.calendarMode === 'Islamic') {
this.calendarUtil = new Islamic();
}
else {
this.calendarUtil = new Gregorian();
}
};
Schedule.prototype.changeView = function (view, event, muteOnChange, index) {

@@ -503,2 +521,3 @@ if (isNullOrUndefined(index)) {

this.setCldrTimeFormat();
this.setcalendarMode();
this.eventsData = [];

@@ -707,11 +726,6 @@ this.eventsProcessed = [];

Schedule.prototype.onPropertyChanged = function (newProp, oldProp) {
var requireRefresh = false;
var requireScheduleRefresh = false;
var state = { isRefresh: false, isResource: false, isDate: false, isView: false, isLayout: false, isDataManager: false };
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
var prop = _a[_i];
switch (prop) {
case 'width':
case 'height':
this.notify(events.uiUpdate, { module: 'scroll', properties: { width: newProp.width, height: newProp.height } });
break;
case 'views':

@@ -722,9 +736,9 @@ this.setViewOptions();

}
this.changeView(this.currentView, null, true);
state.isView = true;
break;
case 'currentView':
this.changeView(newProp.currentView, null, true);
state.isView = true;
break;
case 'selectedDate':
this.changeDate(newProp.selectedDate);
state.isDate = true;
break;

@@ -738,6 +752,3 @@ case 'dateFormat':

case 'showHeaderBar':
if (this.headerModule) {
this.headerModule.destroy();
this.headerModule = null;
}
this.destroyHeaderModule();
if (newProp.showHeaderBar) {

@@ -760,10 +771,9 @@ this.headerModule = new HeaderRenderer(this);

case 'showWeekNumber':
requireRefresh = true;
state.isLayout = true;
break;
case 'eventDragArea':
this.notify(events.dataReady, {});
break;
case 'locale':
case 'calendarMode':
this.setCldrTimeFormat();
requireScheduleRefresh = true;
this.setcalendarMode();
state.isRefresh = true;
break;

@@ -774,7 +784,9 @@ case 'firstDayOfWeek':

}
this.eventWindow.refreshRecurrenceEditor();
requireRefresh = true;
if (this.eventWindow) {
this.eventWindow.refreshRecurrenceEditor();
}
state.isLayout = true;
break;
case 'showTimeIndicator':
if (this.activeViewOptions.timeScale.enable) {
if (this.activeViewOptions.timeScale.enable && this.activeView) {
this.activeView.highlightCurrentTime();

@@ -786,3 +798,3 @@ }

this.cellTemplateFn = this.templateParser(this.activeViewOptions.cellTemplate);
requireRefresh = true;
state.isLayout = true;
break;

@@ -792,3 +804,3 @@ case 'dateHeaderTemplate':

this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);
requireRefresh = true;
state.isLayout = true;
break;

@@ -799,18 +811,37 @@ case 'timezone':

case 'enableRtl':
requireScheduleRefresh = true;
state.isRefresh = true;
break;
default:
this.extendedPropertyChange(prop, newProp, oldProp);
this.extendedPropertyChange(prop, newProp, oldProp, state);
break;
}
}
if (requireScheduleRefresh) {
this.propertyChangeAction(state);
};
Schedule.prototype.propertyChangeAction = function (state) {
if (state.isRefresh) {
this.refresh();
}
else if (requireRefresh) {
else if (state.isResource) {
this.initializeResources(true);
}
else if (state.isView) {
this.changeView(this.currentView, null, true);
}
else if (state.isDate) {
this.changeDate(this.selectedDate);
}
else if (state.isLayout) {
this.initializeView(this.currentView);
}
else if (state.isDataManager && this.renderModule) {
this.renderModule.refreshDataManager();
}
};
Schedule.prototype.extendedPropertyChange = function (prop, newProp, oldProp) {
Schedule.prototype.extendedPropertyChange = function (prop, newProp, oldProp, state) {
switch (prop) {
case 'width':
case 'height':
this.notify(events.uiUpdate, { module: 'scroll', properties: { width: newProp.width, height: newProp.height } });
break;
case 'cssClass':

@@ -827,6 +858,6 @@ if (oldProp.cssClass) {

this.activeViewOptions = this.getActiveViewOptions();
this.changeView(this.currentView, null, true);
state.isView = true;
break;
case 'eventSettings':
this.onEventSettingsPropertyChanged(newProp.eventSettings, oldProp.eventSettings);
this.onEventSettingsPropertyChanged(newProp.eventSettings, oldProp.eventSettings, state);
break;

@@ -846,3 +877,5 @@ case 'allowKeyboardInteraction':

}
this.eventWindow.setDialogContent();
if (this.eventWindow) {
this.eventWindow.setDialogContent();
}
break;

@@ -861,6 +894,6 @@ case 'quickInfoTemplates':

case 'group':
this.onGroupSettingsPropertyChanged(newProp.group, oldProp.group);
this.onGroupSettingsPropertyChanged(newProp.group, oldProp.group, state);
break;
case 'resources':
this.initializeResources(true);
state.isResource = true;
break;

@@ -870,4 +903,6 @@ case 'timeScale':

this.activeViewOptions.timeScale.slotCount = newProp.timeScale.slotCount || this.activeViewOptions.timeScale.slotCount;
this.eventWindow.refreshDateTimePicker();
this.initializeView(this.currentView);
if (this.eventWindow) {
this.eventWindow.refreshDateTimePicker();
}
state.isLayout = true;
break;

@@ -880,5 +915,8 @@ case 'allowDragAndDrop':

break;
case 'eventDragArea':
this.notify(events.dataReady, {});
break;
}
};
Schedule.prototype.onGroupSettingsPropertyChanged = function (newProp, oldProp) {
Schedule.prototype.onGroupSettingsPropertyChanged = function (newProp, oldProp, state) {
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {

@@ -890,9 +928,10 @@ var prop = _a[_i];

else {
this.initializeView(this.currentView);
this.eventWindow.refresh();
state.isLayout = true;
if (this.eventWindow) {
this.eventWindow.refresh();
}
}
}
};
Schedule.prototype.onEventSettingsPropertyChanged = function (newProp, oldProp) {
var requireRefresh = false;
Schedule.prototype.onEventSettingsPropertyChanged = function (newProp, oldProp, state) {
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {

@@ -905,3 +944,3 @@ var prop = _a[_i];

this.initializeDataModule();
requireRefresh = true;
state.isDataManager = true;
break;

@@ -911,3 +950,3 @@ case 'template':

this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);
requireRefresh = true;
state.isDataManager = true;
break;

@@ -930,10 +969,23 @@ case 'enableTooltip':

}
requireRefresh = true;
state.isDataManager = true;
break;
}
}
if (requireRefresh) {
this.renderModule.refreshDataManager();
};
Schedule.prototype.destroyHeaderModule = function () {
if (this.headerModule) {
this.headerModule.destroy();
this.headerModule = null;
}
};
Schedule.prototype.destroyPopups = function () {
if (this.quickPopup) {
this.quickPopup.destroy();
this.quickPopup = null;
}
if (this.eventWindow) {
this.eventWindow.destroy();
this.eventWindow = null;
}
};
/**

@@ -962,4 +1014,4 @@ * Allows to show the spinner on schedule at the required scenarios.

Schedule.prototype.setWorkHours = function (dates, start, end, groupIndex) {
var startHour = this.globalize.parseDate(start, { skeleton: 'Hm' });
var endHour = this.globalize.parseDate(end, { skeleton: 'Hm' });
var startHour = this.globalize.parseDate(start, { skeleton: 'Hm', calendar: this.getCalendarMode() });
var endHour = this.globalize.parseDate(end, { skeleton: 'Hm', calendar: this.getCalendarMode() });
var tableEle = this.getContentTable();

@@ -1018,19 +1070,19 @@ if (isNullOrUndefined(startHour) || isNullOrUndefined(endHour) || !tableEle) {

*/
Schedule.prototype.getCellDetails = function (td) {
var startTime = this.getDateFromElement(td);
if (isNullOrUndefined(startTime)) {
Schedule.prototype.getCellDetails = function (tdCol) {
var td = (tdCol instanceof Array) ? tdCol : [tdCol];
var firstTd = td[0];
var lastTd = td.slice(-1)[0];
var startTime = this.getDateFromElement(firstTd);
var endTime = this.getDateFromElement(lastTd);
if (isNullOrUndefined(startTime) || isNullOrUndefined(endTime)) {
return undefined;
}
var endTime;
var duration = 1;
var endDateFromColSpan = this.activeView.isTimelineView() && !isNullOrUndefined(td.getAttribute('colSpan'));
if (endDateFromColSpan) {
duration = parseInt(td.getAttribute('colSpan'), 10);
}
if (!this.activeViewOptions.timeScale.enable || td.classList.contains(cls.ALLDAY_CELLS_CLASS) ||
td.classList.contains(cls.HEADER_CELLS_CLASS) || endDateFromColSpan) {
var endDateFromColSpan = this.activeView.isTimelineView() && !isNullOrUndefined(lastTd.getAttribute('colSpan'));
var duration = endDateFromColSpan ? parseInt(lastTd.getAttribute('colSpan'), 10) : 1;
if (!this.activeViewOptions.timeScale.enable || endDateFromColSpan || lastTd.classList.contains(cls.ALLDAY_CELLS_CLASS) ||
lastTd.classList.contains(cls.HEADER_CELLS_CLASS)) {
endTime = util.addDays(new Date(startTime.getTime()), duration);
}
else {
endTime = this.activeView.getEndDateFromStartDate(startTime);
endTime = this.activeView.getEndDateFromStartDate(endTime);
}

@@ -1040,6 +1092,6 @@ var data = {

endTime: endTime,
isAllDay: this.isAllDayCell(td),
element: td
isAllDay: this.isAllDayCell(firstTd),
element: tdCol
};
var groupIndex = td.getAttribute('data-group-index');
var groupIndex = firstTd.getAttribute('data-group-index');
if (!isNullOrUndefined(groupIndex)) {

@@ -1246,6 +1298,2 @@ data.groupIndex = parseInt(groupIndex, 10);

Schedule.prototype.destroy = function () {
if (this.quickPopup) {
this.quickPopup.destroy();
this.quickPopup = null;
}
if (this.eventTooltip) {

@@ -1255,11 +1303,5 @@ this.eventTooltip.destroy();

}
if (this.eventWindow) {
this.eventWindow.destroy();
this.eventWindow = null;
}
this.destroyPopups();
this.unwireEvents();
if (this.headerModule) {
this.headerModule.destroy();
this.headerModule = null;
}
this.destroyHeaderModule();
if (this.scrollModule) {

@@ -1311,2 +1353,5 @@ this.scrollModule.destroy();

__decorate([
Property('Gregorian')
], Schedule.prototype, "calendarMode", void 0);
__decorate([
Property(true)

@@ -1313,0 +1358,0 @@ ], Schedule.prototype, "showWeekend", void 0);

@@ -26,1 +26,2 @@ /**

export declare type HeaderRowType = 'Year' | 'Month' | 'Week' | 'Date' | 'Hour';
export declare type CalendarType = 'Islamic' | 'Gregorian';

@@ -60,3 +60,5 @@ import { EventClickArgs, TdData } from '../base/interface';

private appointmentBorderRemove;
wireAppointmentEvents(element: HTMLElement, isAllDay?: boolean, isReadOnly?: boolean): void;
wireAppointmentEvents(element: HTMLElement, isAllDay?: boolean, event?: {
[key: string]: Object;
}): void;
renderResizeHandler(element: HTMLElement, spanEvent: {

@@ -63,0 +65,0 @@ [key: string]: Object;

@@ -61,2 +61,8 @@ import { isNullOrUndefined, closest, extend, EventHandler, uniqueID } from '@syncfusion/ej2-base';

var blockData = processed.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
blockData.forEach(function (eventObj) {
if (eventObj[fields.isAllDay]) {
eventObj[fields.startTime] = util.resetTime(eventObj[fields.startTime]);
eventObj[fields.endTime] = util.addDays(util.resetTime(eventObj[fields.endTime]), 1);
}
});
this.parent.blockProcessed = this.filterEvents(start, end, blockData);

@@ -378,3 +384,3 @@ return eventData;

this.parent.activeCellsData.element) || selectedCell[selectedCell.length - 1]);
this.parent.keyboardInteractionModule.selectCells(false, target);
this.parent.keyboardInteractionModule.selectCells(target instanceof Array, target);
}

@@ -465,5 +471,9 @@ return;

};
EventBase.prototype.wireAppointmentEvents = function (element, isAllDay, isReadOnly) {
EventBase.prototype.wireAppointmentEvents = function (element, isAllDay, event) {
if (isAllDay === void 0) { isAllDay = false; }
if (isReadOnly === void 0) { isReadOnly = false; }
if (this.parent.calendarMode === 'Islamic' && (!isNullOrUndefined(event[this.parent.eventFields.recurrenceRule]) ||
!isNullOrUndefined(event[this.parent.eventFields.recurrenceID]))) {
return;
}
var isReadOnly = (!isNullOrUndefined(event)) ? event[this.parent.eventFields.isReadonly] : false;
EventHandler.add(element, 'click', this.eventClick, this);

@@ -470,0 +480,0 @@ if (!this.parent.isAdaptive && !this.parent.activeViewOptions.readonly && !isReadOnly) {

@@ -45,2 +45,5 @@ var __extends = (this && this.__extends) || (function () {

}
if (!this.element.querySelector('.' + cls.WORK_CELLS_CLASS)) {
return;
}
this.eventHeight = util.getElementHeightFromClass(this.element, cls.APPOINTMENT_CLASS);

@@ -314,3 +317,3 @@ if (this.parent.currentView === 'Month') {

var eventData = record.data;
if (!isNullOrUndefined(record[this.fields.recurrenceRule])) {
if (!isNullOrUndefined(record[this.fields.recurrenceRule]) || !isNullOrUndefined(record[this.fields.recurrenceID])) {
var iconClass = (record[this.fields.id] === record[this.fields.recurrenceID]) ?

@@ -354,3 +357,3 @@ cls.EVENT_RECURRENCE_ICON_CLASS : cls.EVENT_RECURRENCE_EDIT_ICON_CLASS;

this.applyResourceColor(appointmentElement, event, 'backgroundColor', this.groupOrder);
this.wireAppointmentEvents(appointmentElement, false, event[this.fields.isReadonly]);
this.wireAppointmentEvents(appointmentElement, false, event);
setStyleAttribute(appointmentElement, { 'width': appWidth + 'px', 'top': appTop + 'px' });

@@ -357,0 +360,0 @@ this.renderEventElement(event, appointmentElement, cellTd);

@@ -119,3 +119,3 @@ var __extends = (this && this.__extends) || (function () {

});
this.wireAppointmentEvents(appointmentElement, false, event[this.fields.isReadonly]);
this.wireAppointmentEvents(appointmentElement, false, event);
this.renderEventElement(event, appointmentElement, cellTd);

@@ -122,0 +122,0 @@ }

@@ -53,2 +53,5 @@ var __extends = (this && this.__extends) || (function () {

wrapperElements.forEach(function (element) { return remove(element); });
if (!this.element.querySelector('.' + cls.WORK_CELLS_CLASS)) {
return;
}
this.allDayElement = [].slice.call(this.element.querySelectorAll('.' + cls.ALLDAY_CELLS_CLASS));

@@ -287,3 +290,4 @@ this.setAllDayRowHeight(0);

append(templateElement, appointmentDetails);
if (!this.parent.isAdaptive && !isNullOrUndefined(record[fieldMapping.recurrenceRule])) {
if (!this.parent.isAdaptive &&
(!isNullOrUndefined(record[fieldMapping.recurrenceRule]) || !isNullOrUndefined(record[fieldMapping.recurrenceID]))) {
var iconClass = (record[fieldMapping.id] === record[fieldMapping.recurrenceID]) ?

@@ -436,3 +440,3 @@ cls.EVENT_RECURRENCE_ICON_CLASS : cls.EVENT_RECURRENCE_EDIT_ICON_CLASS;

this.addOrRemoveClass();
this.wireAppointmentEvents(appointmentElement, true, eventObj[this.fields.isReadonly]);
this.wireAppointmentEvents(appointmentElement, true, eventObj);
}

@@ -491,3 +495,3 @@ }

this.appendEvent(eventObj, appointmentElement, index, tempData.appLeft);
this.wireAppointmentEvents(appointmentElement, false, eventObj[this.fields.isReadonly]);
this.wireAppointmentEvents(appointmentElement, false, eventObj);
}

@@ -494,0 +498,0 @@ };

@@ -11,2 +11,3 @@ import { Schedule } from '../base/schedule';

private onBeforeRender;
private setContent;
close(): void;

@@ -13,0 +14,0 @@ /**

@@ -55,3 +55,3 @@ import { isNullOrUndefined, append, createElement } from '@syncfusion/ej2-base';

append(this.parent.getHeaderTooltipTemplate()(data), contentContainer);
this.tooltipObj.content = contentContainer;
this.setContent(contentContainer);
return;

@@ -63,3 +63,3 @@ }

append(this.parent.getEventTooltipTemplate()(record), contentContainer);
this.tooltipObj.content = contentContainer;
this.setContent(contentContainer);
}

@@ -76,10 +76,22 @@ else {

var tooltipLocation = !isNullOrUndefined(record[fields.location]) ? record[fields.location] : '';
var startMonthDate = globalize.formatDate(eventStart, { type: 'date', skeleton: 'MMMd' });
var startMonthYearDate = globalize.formatDate(eventStart, { type: 'date', skeleton: 'yMMMd' });
var endMonthYearDate = globalize.formatDate(eventEnd, { type: 'date', skeleton: 'yMMMd' });
var startTime = globalize.formatDate(eventStart, { type: 'time', skeleton: 'short' });
var endTime = globalize.formatDate(eventEnd, { type: 'time', skeleton: 'short' });
var startMonthDate = globalize.formatDate(eventStart, {
type: 'date', skeleton: 'MMMd', calendar: this.parent.getCalendarMode()
});
var startMonthYearDate = globalize.formatDate(eventStart, {
type: 'date', skeleton: 'medium', calendar: this.parent.getCalendarMode()
});
var endMonthYearDate = globalize.formatDate(eventEnd, {
type: 'date', skeleton: 'medium', calendar: this.parent.getCalendarMode()
});
var startTime = globalize.formatDate(eventStart, {
type: 'time', skeleton: 'short', calendar: this.parent.getCalendarMode()
});
var endTime = globalize.formatDate(eventEnd, {
type: 'time', skeleton: 'short', calendar: this.parent.getCalendarMode()
});
var tooltipDetails = void 0;
if (startDate.getTime() === endDate.getTime()) {
tooltipDetails = globalize.formatDate(eventStart, { type: 'date', skeleton: 'long' });
tooltipDetails = globalize.formatDate(eventStart, {
type: 'date', skeleton: 'long', calendar: this.parent.getCalendarMode()
});
}

@@ -92,8 +104,12 @@ else {

(startTime + ' - ' + endTime);
this.tooltipObj.content = '<div><div class="e-subject">' + tooltipSubject + '</div>' +
var content = '<div><div class="e-subject">' + tooltipSubject + '</div>' +
'<div class="e-location">' + tooltipLocation + '</div>' +
'<div class="e-details">' + tooltipDetails + '</div>' +
'<div class="e-all-day">' + tooltipTime + '</div></div>';
this.setContent(content);
}
};
EventTooltip.prototype.setContent = function (content) {
this.tooltipObj.setProperties({ content: content }, true);
};
EventTooltip.prototype.close = function () {

@@ -100,0 +116,0 @@ this.tooltipObj.close();

@@ -16,3 +16,2 @@ import { Dialog, Popup } from '@syncfusion/ej2-popups';

private fieldValidator;
newEventClone: Element;
/**

@@ -19,0 +18,0 @@ * Constructor for QuickPopups

@@ -280,3 +280,3 @@ import { closest, EventHandler, isNullOrUndefined, formatUnit, append } from '@syncfusion/ej2-base';

moreEventWrapperEle.appendChild(appointmentEle);
this.parent.eventBase.wireAppointmentEvents(appointmentEle);
this.parent.eventBase.wireAppointmentEvents(appointmentEle, false, eventData);
this.parent.eventBase.applyResourceColor(appointmentEle, eventData, 'backgroundColor', groupOrder);

@@ -318,19 +318,21 @@ }

}
var targetEle = args.event.target;
if (this.parent.isAdaptive) {
this.quickPopupHide();
if (isNullOrUndefined(this.newEventClone)) {
this.newEventClone = createElement('div', {
var newEventClone = this.parent.element.querySelector('.' + cls.NEW_EVENT_CLASS);
if (isNullOrUndefined(newEventClone)) {
newEventClone = createElement('div', {
className: cls.NEW_EVENT_CLASS,
innerHTML: '<div class="e-title"> + </div>'
innerHTML: "<div class=\"e-title\">+ " + this.l10n.getConstant('newEvent') + "</div>"
});
}
if (args.event.target.classList.contains(cls.WORK_CELLS_CLASS) ||
args.event.target.classList.contains(cls.ALLDAY_CELLS_CLASS)) {
args.event.target.appendChild(this.newEventClone);
var targetCell = closest(targetEle, '.' + cls.WORK_CELLS_CLASS + ',.' + cls.ALLDAY_CELLS_CLASS);
if (targetCell) {
targetCell.appendChild(newEventClone);
}
return;
}
var target = closest(args.event.target, '.' + cls.WORK_CELLS_CLASS + ',.' + cls.ALLDAY_CELLS_CLASS + ',.' +
var target = closest(targetEle, '.' + cls.WORK_CELLS_CLASS + ',.' + cls.ALLDAY_CELLS_CLASS + ',.' +
cls.HEADER_CELLS_CLASS);
if (isNullOrUndefined(target) || args.event.target.classList.contains(cls.MORE_INDICATOR_CLASS)) {
if (isNullOrUndefined(target) || targetEle.classList.contains(cls.MORE_INDICATOR_CLASS)) {
return;

@@ -807,3 +809,3 @@ }

QuickPopups.prototype.getDateFormat = function (date, formatString) {
return this.parent.globalize.formatDate(date, { skeleton: formatString });
return this.parent.globalize.formatDate(date, { skeleton: formatString, calendar: this.parent.getCalendarMode() });
};

@@ -1003,2 +1005,3 @@ QuickPopups.prototype.getDataFromTarget = function (target) {

this.morePopup.destroy();
remove(this.morePopup.element);
if (this.quickDialog.element) {

@@ -1005,0 +1008,0 @@ this.quickDialog.destroy();

@@ -376,3 +376,3 @@ var __extends = (this && this.__extends) || (function () {

var currentDate = isNullOrUndefined(date) ? this.parent.selectedDate : date;
return this.parent.globalize.formatDate(currentDate, { format: formatDate });
return this.parent.globalize.formatDate(currentDate, { format: formatDate, calendar: this.parent.getCalendarMode() });
}

@@ -379,0 +379,0 @@ else {

@@ -131,3 +131,3 @@ import { isNullOrUndefined, createElement, remove, closest, addClass, removeClass, extend } from '@syncfusion/ej2-base';

HeaderRenderer.prototype.getDateRangeText = function () {
return this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM y' });
return this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM y', calendar: this.parent.getCalendarMode() });
};

@@ -266,2 +266,3 @@ HeaderRenderer.prototype.getItems = function () {

start: calendarView,
calendarMode: this.parent.calendarMode,
change: this.calendarChange.bind(this)

@@ -268,0 +269,0 @@ });

@@ -111,3 +111,3 @@ var __extends = (this && this.__extends) || (function () {

}
if (this.parent.uiStateValues.isGroupAdaptive) {
if (this.parent.uiStateValues.isGroupAdaptive && this.parent.resourceBase.lastResourceLevel.length > 0) {
var resourceLevel = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];

@@ -267,7 +267,8 @@ colLevels = [this.getDateSlots(resourceLevel.renderDates, resourceLevel.workDays)];

var ele = createElement('span', { className: cls.NAVIGATE_CLASS });
var title = this.parent.globalize.formatDate(td.date, { skeleton: 'full' });
var title = this.parent.globalize.formatDate(td.date, { skeleton: 'full', calendar: this.parent.getCalendarMode() });
ele.setAttribute('title', title);
ele.innerHTML = (td.date.getDate() === 1 && !this.isCurrentDate(td.date) && !this.parent.isAdaptive) ?
this.parent.globalize.formatDate(td.date, { format: 'MMM d' }) :
this.parent.globalize.formatDate(td.date, { skeleton: 'd' });
ele.innerHTML =
(this.parent.calendarUtil.isMonthStart(td.date) && !this.isCurrentDate(td.date) && !this.parent.isAdaptive) ?
this.parent.globalize.formatDate(td.date, { format: 'MMM d', calendar: this.parent.getCalendarMode() }) :
this.parent.globalize.formatDate(td.date, { skeleton: 'd', calendar: this.parent.getCalendarMode() });
tdEle.appendChild(ele);

@@ -282,2 +283,5 @@ }

Month.prototype.getContentSlots = function () {
if (!(this.colLevels[this.colLevels.length - 1] && this.colLevels[this.colLevels.length - 1][0])) {
return [];
}
var slotDatas = [];

@@ -355,4 +359,4 @@ var prepareSlots = function (rowIndex, renderDate, resData, classList) {

this.monthDates = {
start: util.firstDateOfMonth(monthDate),
end: util.lastDateOfMonth(util.addMonths(monthDate, this.parent.activeViewOptions.interval - 1))
start: this.parent.calendarUtil.firstDateOfMonth(monthDate),
end: this.parent.calendarUtil.lastDateOfMonth(util.addMonths(monthDate, this.parent.activeViewOptions.interval - 1))
};

@@ -420,5 +424,6 @@ var tBody = tbl.querySelector('tbody');

var dateHeader = createElement('div', { className: cls.DATE_HEADER_CLASS });
dateHeader.innerHTML = (data.date.getDate() === 1 && !this.isCurrentDate(data.date) && !this.parent.isAdaptive) ?
this.parent.globalize.formatDate(data.date, { format: 'MMM d' }) :
this.parent.globalize.formatDate(data.date, { skeleton: 'd' });
dateHeader.innerHTML =
(this.parent.calendarUtil.isMonthStart(data.date) && !this.isCurrentDate(data.date) && !this.parent.isAdaptive) ?
this.parent.globalize.formatDate(data.date, { format: 'MMM d', calendar: this.parent.getCalendarMode() }) :
this.parent.globalize.formatDate(data.date, { skeleton: 'd', calendar: this.parent.getCalendarMode() });
ntd.appendChild(dateHeader);

@@ -430,3 +435,3 @@ if (this.getModuleName() === 'month') {

Month.prototype.getMonthStart = function (currentDate) {
var monthStart = util.getWeekFirstDate(util.firstDateOfMonth(currentDate), this.parent.firstDayOfWeek);
var monthStart = util.getWeekFirstDate(this.parent.calendarUtil.firstDateOfMonth(currentDate), this.parent.firstDayOfWeek);
var start = new Date(monthStart.getFullYear(), monthStart.getMonth(), monthStart.getDate());

@@ -437,3 +442,3 @@ return start;

var endDate = util.addMonths(currentDate, this.parent.activeViewOptions.interval - 1);
var lastWeekOfMonth = util.getWeekFirstDate(util.lastDateOfMonth(endDate), this.parent.firstDayOfWeek);
var lastWeekOfMonth = util.getWeekFirstDate(this.parent.calendarUtil.lastDateOfMonth(endDate), this.parent.firstDayOfWeek);
var monthEnd = util.addDays(lastWeekOfMonth, util.WEEK_LENGTH - 1);

@@ -479,11 +484,13 @@ return monthEnd;

if (this.parent.selectedDate.getFullYear() === endDate.getFullYear()) {
var monthNames = (this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM' }))
+ ' - ' + (this.parent.globalize.formatDate(endDate, { format: 'MMMM ' })) + endDate.getFullYear();
var monthNames = (this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM', calendar: this.parent.getCalendarMode() })) + ' - ' +
(this.parent.globalize.formatDate(endDate, { format: 'MMMM ', calendar: this.parent.getCalendarMode() })) +
endDate.getFullYear();
return monthNames;
}
return (this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM' })) + ' ' +
this.parent.selectedDate.getFullYear() + ' - ' + (this.parent.globalize.formatDate(endDate, { format: 'MMMM ' })) +
return (this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM', calendar: this.parent.getCalendarMode() })) + ' ' +
this.parent.selectedDate.getFullYear() + ' - ' + (this.parent.globalize.formatDate(endDate, { format: 'MMMM ', calendar: this.parent.getCalendarMode() })) +
endDate.getFullYear();
}
return this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM y' });
return this.parent.globalize.
formatDate(this.parent.selectedDate, { format: 'MMMM y', calendar: this.parent.getCalendarMode() });
}

@@ -494,3 +501,3 @@ return this.formatDateRange(this.parent.selectedDate);

return this.parent.localeObj.getConstant(view) + ' of ' +
this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM y' });
this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM y', calendar: this.parent.getCalendarMode() });
};

@@ -497,0 +504,0 @@ Month.prototype.createWeekNumberElement = function (text) {

@@ -47,6 +47,6 @@ import { compile } from '@syncfusion/ej2-base';

getYear: function (dt) {
return _this.parent.globalize.formatDate(dt, { format: 'y' });
return _this.parent.globalize.formatDate(dt, { format: 'y', calendar: _this.parent.getCalendarMode() });
},
getMonth: function (dt) {
return _this.parent.globalize.formatDate(dt, { format: 'MMMM' });
return _this.parent.globalize.formatDate(dt, { format: 'MMMM', calendar: _this.parent.getCalendarMode() });
},

@@ -53,0 +53,0 @@ getWeekNumber: function (dt) {

@@ -132,8 +132,8 @@ var __extends = (this && this.__extends) || (function () {

TimelineMonth.prototype.getMonthStart = function (currentDate) {
var monthStart = util.firstDateOfMonth(util.resetTime(currentDate));
var monthStart = this.parent.calendarUtil.firstDateOfMonth(util.resetTime(currentDate));
return new Date(monthStart.getFullYear(), monthStart.getMonth(), monthStart.getDate());
};
TimelineMonth.prototype.getMonthEnd = function (currentDate) {
var monthStart = util.firstDateOfMonth(util.resetTime(currentDate));
return util.lastDateOfMonth(util.addMonths(new Date(+monthStart), this.parent.activeViewOptions.interval - 1));
var monthStart = this.parent.calendarUtil.firstDateOfMonth(util.resetTime(currentDate));
return this.parent.calendarUtil.lastDateOfMonth(util.addMonths(new Date(+monthStart), this.parent.activeViewOptions.interval - 1));
};

@@ -140,0 +140,0 @@ TimelineMonth.prototype.generateColumnLevels = function () {

@@ -39,3 +39,3 @@ var __extends = (this && this.__extends) || (function () {

TimelineViews.prototype.scrollToWorkHour = function () {
var start = this.parent.globalize.parseDate(this.parent.workHours.start, { skeleton: 'Hm' });
var start = this.parent.globalize.parseDate(this.parent.workHours.start, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
var currDateTime = this.isWorkDay(this.parent.selectedDate) && this.parent.workHours.highlight &&

@@ -51,3 +51,3 @@ !isNullOrUndefined(start) ? new Date(+this.parent.selectedDate).setHours(start.getHours(), start.getMinutes())

TimelineViews.prototype.scrollToHour = function (hour) {
var date = this.parent.globalize.parseDate(hour, { skeleton: 'Hm' });
var date = this.parent.globalize.parseDate(hour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
if (isNullOrUndefined(date)) {

@@ -186,4 +186,4 @@ return;

var resEHr = resLevel.resourceData[resLevel.resource.endHourField] || this.parent.workHours.end;
tdData.startHour = this.parent.globalize.parseDate(resSHr, { skeleton: 'Hm' });
tdData.endHour = this.parent.globalize.parseDate(resEHr, { skeleton: 'Hm' });
tdData.startHour = this.parent.globalize.parseDate(resSHr, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
tdData.endHour = this.parent.globalize.parseDate(resEHr, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
tdData.workDays = resLevel.resourceData[resLevel.resource.workDaysField] || this.parent.workDays;

@@ -190,0 +190,0 @@ tdData.className = resLevel.className;

@@ -141,3 +141,3 @@ var __extends = (this && this.__extends) || (function () {

VerticalView.prototype.scrollToHour = function (hour) {
var date = this.parent.globalize.parseDate(hour, { skeleton: 'Hm' });
var date = this.parent.globalize.parseDate(hour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
if (isNullOrUndefined(date)) {

@@ -153,3 +153,3 @@ return;

columnLevels = this.parent.resourceBase.generateResourceLevels(level);
if (this.parent.uiStateValues.isGroupAdaptive) {
if (this.parent.uiStateValues.isGroupAdaptive && this.parent.resourceBase.lastResourceLevel.length > 0) {
var resourceLevel = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];

@@ -172,4 +172,4 @@ var resStartHour = resourceLevel.resourceData[resourceLevel.resource.startHourField];

var dateCol = [];
var start = this.parent.globalize.parseDate(workStartHour, { skeleton: 'Hm' });
var end = this.parent.globalize.parseDate(workEndHour, { skeleton: 'Hm' });
var start = this.parent.globalize.parseDate(workStartHour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
var end = this.parent.globalize.parseDate(workEndHour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
for (var _i = 0, renderDates_1 = renderDates; _i < renderDates_1.length; _i++) {

@@ -230,3 +230,3 @@ var col = renderDates_1[_i];

else {
var renderDates = (this.parent.uiStateValues.isGroupAdaptive) ?
var renderDates = (this.parent.uiStateValues.isGroupAdaptive && this.parent.resourceBase.lastResourceLevel.length > 0) ?
this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].renderDates : this.renderDates;

@@ -401,3 +401,3 @@ var index = this.parent.getIndexOfDate(renderDates, util.resetTime(new Date()));

var ntr_1 = trEle.cloneNode();
var data_1 = { className: [this.colLevels[i][0].className[0]], type: 'emptyCells' };
var data_1 = { className: [(this.colLevels[i][0] && this.colLevels[i][0].className[0])], type: 'emptyCells' };
if (this.parent.activeViewOptions.showWeekNumber && data_1.className.indexOf(cls.HEADER_CELLS_CLASS) !== -1) {

@@ -653,4 +653,4 @@ data_1.className.push(cls.WEEK_NUMBER_CLASS);

var dt = new Date(msStartHour);
var start = this.parent.globalize.parseDate(this.parent.workHours.start, { skeleton: 'Hm' });
var end = this.parent.globalize.parseDate(this.parent.workHours.end, { skeleton: 'Hm' });
var start = this.parent.globalize.parseDate(this.parent.workHours.start, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
var end = this.parent.globalize.parseDate(this.parent.workHours.end, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
for (var i = 0; i < length; i++) {

@@ -692,3 +692,6 @@ var majorTickDivider = i % (msMajorInterval / msInterval);

if (this.element) {
EventHandler.remove(this.getContentAreaElement(), 'scroll', this.onContentScroll);
var contentScrollableEle = this.getContentAreaElement();
if (contentScrollableEle) {
EventHandler.remove(contentScrollableEle, 'scroll', this.onContentScroll);
}
if (this.parent.resourceBase) {

@@ -695,0 +698,0 @@ this.parent.resourceBase.destroy();

@@ -18,7 +18,7 @@ import { createElement, append, prepend, isNullOrUndefined, getValue, getDefaultDateObject, cldrData, addClass } from '@syncfusion/ej2-base';

getDate: function (dt) {
return _this.parent.globalize.formatDate(dt, { format: 'd' });
return _this.parent.globalize.formatDate(dt, { format: 'd', calendar: _this.parent.getCalendarMode() });
},
getTime: function (dt) {
if (_this.parent.isAdaptive) {
return _this.parent.globalize.formatDate(dt, { skeleton: 'h' });
return _this.parent.globalize.formatDate(dt, { skeleton: 'h', calendar: _this.parent.getCalendarMode() });
}

@@ -28,3 +28,3 @@ return _this.parent.getTimeString(dt);

getTimelineDate: function (dt) {
return _this.parent.globalize.formatDate(dt, { skeleton: 'MMMd' }) + ', ' + _this.parent.getDayNames('wide')[dt.getDay()];
return _this.parent.globalize.formatDate(dt, { skeleton: 'MMMd', calendar: _this.parent.getCalendarMode() }) + ', ' + _this.parent.getDayNames('wide')[dt.getDay()];
}

@@ -75,3 +75,3 @@ };

var length = lastRow.length;
if (lastRow[0].colSpan) {
if (lastRow[0] && lastRow[0].colSpan) {
length = lastRow.map(function (value) { return value.colSpan; }).reduce(function (prev, next) { return prev + next; });

@@ -138,3 +138,6 @@ }

if (this.parent.uiStateValues.isGroupAdaptive) {
headerBarHeight += this.parent.element.querySelector('.' + cls.RESOURCE_HEADER_TOOLBAR).offsetHeight;
var resHeader = this.parent.element.querySelector('.' + cls.RESOURCE_HEADER_TOOLBAR);
if (resHeader) {
headerBarHeight += resHeader.offsetHeight;
}
}

@@ -184,3 +187,3 @@ return headerBarHeight;

ViewBase.prototype.getStartHour = function () {
var startHour = this.parent.globalize.parseDate(this.parent.activeViewOptions.startHour, { skeleton: 'Hm' });
var startHour = this.parent.globalize.parseDate(this.parent.activeViewOptions.startHour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
if (isNullOrUndefined(startHour)) {

@@ -192,3 +195,3 @@ startHour = new Date(2000, 0, 0, 0);

ViewBase.prototype.getEndHour = function () {
var endHour = this.parent.globalize.parseDate(this.parent.activeViewOptions.endHour, { skeleton: 'Hm' });
var endHour = this.parent.globalize.parseDate(this.parent.activeViewOptions.endHour, { skeleton: 'Hm', calendar: this.parent.getCalendarMode() });
if (isNullOrUndefined(endHour)) {

@@ -282,8 +285,8 @@ endHour = new Date(2000, 0, 0, 0);

ViewBase.prototype.getLabelText = function (view) {
return this.parent.localeObj.getConstant(view) + ' of ' +
this.parent.globalize.formatDate(this.parent.selectedDate, { skeleton: 'long' });
return this.parent.localeObj.getConstant(view) + ' of ' + this.parent.globalize.formatDate(this.parent.selectedDate, { skeleton: 'long', calendar: this.parent.getCalendarMode() });
};
ViewBase.prototype.getDateRangeText = function () {
if (this.parent.isAdaptive) {
return this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM y' });
return this.parent.globalize.
formatDate(this.parent.selectedDate, { format: 'MMMM y', calendar: this.parent.getCalendarMode() });
}

@@ -299,6 +302,7 @@ return this.formatDateRange(this.renderDates[0], this.renderDates[this.renderDates.length - 1]);

if (!endDate) {
return globalize.formatDate(startDate, { format: this.parent.activeViewOptions.dateFormat });
return globalize.formatDate(startDate, { format: this.parent.activeViewOptions.dateFormat, calendar: this.parent.getCalendarMode() });
}
return globalize.formatDate(startDate, { format: this.parent.activeViewOptions.dateFormat }) + ' - ' +
globalize.formatDate(endDate, { format: this.parent.activeViewOptions.dateFormat });
return globalize.formatDate(startDate, { format: this.parent.activeViewOptions.dateFormat, calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.
formatDate(endDate, { format: this.parent.activeViewOptions.dateFormat, calendar: this.parent.getCalendarMode() });
}

@@ -311,6 +315,6 @@ var formattedStr;

else {
longDateFormat = getValue('main.' + '' + this.parent.locale + '.dates.calendars.gregorian.dateFormats.long', cldrData);
longDateFormat = getValue('main.' + '' + this.parent.locale + '.dates.calendars.' + this.parent.getCalendarMode() + '.dateFormats.long', cldrData);
}
if (!endDate) {
return globalize.formatDate(startDate, { format: longDateFormat });
return globalize.formatDate(startDate, { format: longDateFormat, calendar: this.parent.getCalendarMode() });
}

@@ -321,13 +325,13 @@ var dateFormat = longDateFormat.trim().toLocaleLowerCase();

if (startDate.getMonth() === endDate.getMonth()) {
formattedStr = globalize.formatDate(startDate, { format: 'dd' }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd MMMM yyyy' });
formattedStr = globalize.formatDate(startDate, { format: 'dd', calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd MMMM yyyy', calendar: this.parent.getCalendarMode() });
}
else {
formattedStr = globalize.formatDate(startDate, { format: 'dd MMM' }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd MMM yyyy' });
formattedStr = globalize.formatDate(startDate, { format: 'dd MMM', calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd MMM yyyy', calendar: this.parent.getCalendarMode() });
}
}
else {
formattedStr = globalize.formatDate(startDate, { format: 'dd MMM yyyy' }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd MMM yyyy' });
formattedStr = globalize.formatDate(startDate, { format: 'dd MMM yyyy', calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd MMM yyyy', calendar: this.parent.getCalendarMode() });
}

@@ -338,18 +342,19 @@ }

if (startDate.getMonth() === endDate.getMonth()) {
formattedStr = globalize.formatDate(startDate, { format: 'MMMM dd' }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd, yyyy' });
formattedStr = globalize.formatDate(startDate, { format: 'MMMM dd', calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.formatDate(endDate, { format: 'dd, yyyy', calendar: this.parent.getCalendarMode() });
}
else {
formattedStr = globalize.formatDate(startDate, { format: 'MMM dd' }) + ' - ' +
globalize.formatDate(endDate, { format: 'MMM dd, yyyy' });
formattedStr = globalize.formatDate(startDate, { format: 'MMM dd', calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.formatDate(endDate, { format: 'MMM dd, yyyy', calendar: this.parent.getCalendarMode() });
}
}
else {
formattedStr = globalize.formatDate(startDate, { format: 'MMM dd, yyyy' }) + ' - ' +
globalize.formatDate(endDate, { format: 'MMM dd, yyyy' });
formattedStr = globalize.
formatDate(startDate, { format: 'MMM dd, yyyy', calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.formatDate(endDate, { format: 'MMM dd, yyyy', calendar: this.parent.getCalendarMode() });
}
}
else {
formattedStr = globalize.formatDate(startDate, { format: longDateFormat }) + ' - ' +
globalize.formatDate(endDate, { format: longDateFormat });
formattedStr = globalize.formatDate(startDate, { format: longDateFormat, calendar: this.parent.getCalendarMode() }) + ' - ' +
globalize.formatDate(endDate, { format: longDateFormat, calendar: this.parent.getCalendarMode() });
}

@@ -361,4 +366,4 @@ return formattedStr;

className: className,
innerHTML: '<div class="e-m-date">' + this.parent.globalize.formatDate(date, { format: 'd' }) + '</div>' +
'<div class="e-m-day">' + this.parent.globalize.formatDate(date, { format: 'E' }) + '</div>'
innerHTML: '<div class="e-m-date">' + this.parent.globalize.formatDate(date, { format: 'd', calendar: this.parent.getCalendarMode() }) + '</div>' + '<div class="e-m-day">' +
this.parent.globalize.formatDate(date, { format: 'E', calendar: this.parent.getCalendarMode() }) + '</div>'
});

@@ -383,2 +388,5 @@ return wrap;

ViewBase.prototype.renderResourceMobileLayout = function () {
if (this.parent.resourceBase.lastResourceLevel && this.parent.resourceBase.lastResourceLevel.length <= 0) {
return;
}
this.parent.resourceBase.renderResourceHeader();

@@ -385,0 +393,0 @@ this.parent.resourceBase.renderResourceTree();

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc