public onPopupOpen(args: PopupOpenEventArgs): void {
if (args.type == "QuickInfo" && args.target.classList.contains('e-appointment')) {
args.cancel = true;
let events: any = this.scheduleObj.getCurrentViewEvents();
for (let i = 0; i < events.length; i++) {
if (events[i].Subject == "Testing") {
let date = new Date(events[i].StartTime).getTime();
let eventPosition = document.querySelector('[data-date="' + date + '"]');
document.querySelector(".e-content-wrap").scrollLeft = (eventPosition as HTMLDivElement).offsetLeft;
}
}
}
} |
public sliderChange(args: SliderChangeEventArgs): void {
if (this.scheduleObj.currentView === "TimelineMonth") {
if (args.value === 0) {
this.scheduleObj.setProperties({ headerRows: [{ option: "Date" }] });
} else if (args.value === 10) {
this.scheduleObj.setProperties({ headerRows: [{ option: "Week" }, { option: "Date" }] });
} else if (args.value === 20) {
this.scheduleObj.setProperties({ headerRows: [{ option: "Month" }, { option: "Week" }, { option: "Date" }] });
} else if (args.value === 30) {
this.scheduleObj.setProperties({ headerRows: [{ option: "Year" }, { option: "Month" }, { option: "Week" }, { option: "Date" }] });
}
} else {
if (args.value === 0) {
this.scheduleObj.setProperties({ timeScale: { enable: true, interval: 60, slotCount: 1 } });
} else if (args.value === 10) {
this.scheduleObj.setProperties({ timeScale: { enable: true, interval: 60, slotCount: 2 } });
} else if (args.value === 20) {
this.scheduleObj.setProperties({ timeScale: { enable: true, interval: 60, slotCount: 3 } });
} else if (args.value === 30) {
this.scheduleObj.setProperties({ timeScale: { enable: true, interval: 60, slotCount: 4 } });
} else if (args.value === 40) {
this.scheduleObj.setProperties({ timeScale: { enable: true, interval: 60, slotCount: 5 } });
} else if (args.value === 50) {
this.scheduleObj.setProperties({ timeScale: { enable: true, interval: 60, slotCount: 6 } });
}
}
} |