@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-calendars/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-lists/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-angular-schedule/styles/material.css'; |
let roomElement: HTMLInputElement = args.element.querySelector('#RoomId');
if (!roomElement.classList.contains('e-multiselect')) {
let roomObject: MultiSelect = new MultiSelect({
placeholder: 'Choose a owner',
fields: { text: 'RoomText', value: 'Id' },
dataSource: (this.roomDataSource as any),
value: <string[]>(((args.data as any).RoomId instanceof Array) ? (args.data as any).RoomId : [(args.data as any).RoomId])
});
roomObject.appendTo(roomElement);
}
let ownerElement: HTMLInputElement = args.element.querySelector('#OwnerId');
if (!ownerElement.classList.contains('e-multiselect')) {
let ownerObject: MultiSelect = new MultiSelect({
placeholder: 'Choose a owner',
fields: { text: 'OwnerText', value: 'Id' },
dataSource: (this.ownerDataSource as any),
value: <string[]>(((args.data as any).OwnerId instanceof Array) ? (args.data as any).OwnerId : [(args.data as any).OwnerId])
});
ownerObject.appendTo(ownerElement);
} |
if (args.target.classList.contains('e-work-cells')) {
let subjectElement: HTMLInputElement = args.element.querySelector('#Subject') as HTMLInputElement;
subjectElement.value = "Enter some text";
} |
<input id="StartTime" class="e-field" type="text" name="StartTime" autofocus /> |
var dialog = (args.element as any).ej2_instances[0];
dialog.open = function () {
(args.element.querySelector('.e-schedule-dialog #RoomId') as any).ej2_instances[0].refresh();
(args.element.querySelector('.e-schedule-dialog #OwnerId') as any).ej2_instances[0].refresh();
}; |
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-calendars/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-lists/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-angular-schedule/styles/material.css'; |
onPopupOpen(args: PopupOpenEventArgs): void {
if (args.type === 'QuickInfo') {
const dialogObj = (args.element as any).ej2_instances[0];
dialogObj.hide();
const currentAction = args.target.classList.contains("e-work-cells") ? "Add" : "Save";
this.scheduleObj.openEditor(args.data, currentAction);
}
} |
public customFn(args: any): Boolean {
// It allows to select the date only a year in 2018
return (new Date(args.element.value).getFullYear() === 2018);
}
onPopupClose(args: PopupCloseEventArgs): void {
if (args.type === 'Editor') {
|