<div class="col-lg-9 control-section"> <div class="content-wrapper"> <ejs-schedule id="schedule" popupOpen="OnPopupOpen" width="100%" height="650px" cssClass="time-scale" selectedDate="new DateTime(DateTime.Today.Year, 1, 10)" currentView="TimelineWeek" workDays="@ViewBag.workDays"> <e-schedule-timescale interval="1440" slotCount="1" enable="true"></e-schedule-timescale> <e-schedule-views> <e-schedule-view option="Day"></e-schedule-view> <e-schedule-view option="Week"></e-schedule-view> <e-schedule-view option="TimelineDay"></e-schedule-view> <e-schedule-view option="TimelineWeek"></e-schedule-view> </e-schedule-views> <e-schedule-eventsettings dataSource="@ViewBag.datasource"></e-schedule-eventsettings> </ejs-schedule> </div> </div>
<script type="text/javascript"> function OnPopupOpen(args) { if (args.type === 'Editor') { var dialogObj = args.element.ej2_instances[0]; dialogObj.open = (e) => { var startElementObj = args.element.querySelector('#StartTime').ej2_instances[0]; startElementObj.step = 30; var endElementObj = args.element.querySelector('#EndTime').ej2_instances[0]; endElementObj.step = 30; }; } } </script> |