<ejs-schedule id="schedule" height="550" selectedDate="new DateTime(2018, 2, 15)" views="@ViewBag.view" popupOpen="onPopupOpen">
<e-schedule-eventsettings dataSource="@ViewBag.datasource"></e-schedule-eventsettings>
<e-schedule-quickinfotemplates header="#headerTemplate" content="#contentTemplate" footer="#footerTemplate">
</e-schedule-quickinfotemplates>
</ejs-schedule> |
<script type="text/javascript">
function onPopupOpen(args) {
if (args.type === "QuickInfo" && args.target && args.target.classList.contains('e-work-cells')) {
let row = ej.base.createElement("div", { className: "custom-field-row" });
let container = ej.base.createElement("div", {
className: "custom-field-container"
});
let inputEle = ej.base.createElement("input", {
className: "e-field",
attrs: { name: "EventType" }
});
container.appendChild(inputEle);
row.appendChild(container);
var dropDownList = new ej.dropdowns.DropDownList({
dataSource: [
{ text: "Public Event", value: "public-event" },
{ text: "Maintenance", value: "maintenance" },
{ text: "Commercial Event", value: "commercial-event" },
{ text: "Family Event", value: "family-event" }
],
fields: { text: "text", value: "value" },
value: "",
floatLabelType: "Always",
placeholder: "Event Type"
});
dropDownList.appendTo(inputEle);
let formElement = args.element.querySelector(".e-schedule-form");
formElement.appendChild(row);
}
}
</script> |