<div>
@(Html.EJS().Schedule("schedule")
.Width("100%")
.Height("550px")
.ActionBegin("onActionBegin")
.SelectedDate(new DateTime(2018, 2, 15))
.Render()
)
</div>
<script type="text/javascript">
var profilePopup;
function onActionBegin(args) {
if (args.requestType === 'toolbarItemRendering') {
var sportsData = [
{ Id: 'Game1', Game: 'American Football' },
{ Id: 'Game2', Game: 'Badminton' },
{ Id: 'Game3', Game: 'Basketball' },
{ Id: 'Game4', Game: 'Cricket' },
{ Id: 'Game5', Game: 'Football' },
{ Id: 'Game6', Game: 'Golf' },
{ Id: 'Game7', Game: 'Hockey' },
{ Id: 'Game8', Game: 'Rugby' },
{ Id: 'Game9', Game: 'Snooker' },
{ Id: 'Game10', Game: 'Tennis' },
];
var userIconItem = {
align: 'Left', type: 'Input', template: new ej.dropdowns.DropDownList({ dataSource: sportsData, width: 120, index: 2, fields: { text: 'Game' }, })
};
args.items.push(userIconItem);
}
}
</script> |