onActionBegin(args: ActionEventArgs): void {
if (args.requestType === 'toolbarItemRendering') {
let arg = args as any;
let userIconItem = {
template: '<input type="text" tabindex="0" id="dropdown" />',
type: 'Input'
};
arg.items.push(userIconItem);
}
}
onActionComplete(args: ActionEventArgs): void {
let dropdowns = this.scheduleObj.element.querySelector('#dropdown') as any;
if (args.requestType === 'toolBarItemRendered') {
let dropdown = new DropDownList({
popupHeight: '200px',
value: 'Week',
change: function(event) {
var view = (document.querySelector('.e-schedule') as any)
.ej2_instances[0];
view.currentView = event.value;
},
fields: { text: 'text', value: 'value' },
dataSource: [
{ text: 'Day', value: 'Day' },
{ text: 'Week', value: 'Week' },
{ text: 'WorkWeek', value: 'WorkWeek' },
{ text: 'Month', value: 'Month' }
]
});
dropdown.appendTo(dropdowns);
}
}
.e-toolbar-right {
display: none !important;
} |