Hi Derrick,
Thanks for the update.
To store the numeric values in your database, we have to maintain the separate field in the event object. If we are not maintaining the field, the UI changes do not store in the database. So we suggest you please add an additional field in the event database like the below code snippet.
{
Id: 1,
Subject: "Server Maintenance",
StartTime: new Date(2018, 1, 11, 10, 0),
EndTime: new Date(2018, 1, 11, 11, 30),
EventType: "maintenance",
City: "Seattle",
CategoryColor: "#1aaa55",
Number: 10
}
onPopupOpen(args: PopupOpenEventArgs): void {
if (args.type === "Editor") {
// Create required custom elements in initial time
if (!args.element.querySelector(".custom-field-row")) {
let row: HTMLElement = createElement("div", {
className: "custom-field-row"
});
let formElement: HTMLElement = <HTMLElement>(
args.element.querySelector(".e-schedule-form")
);
args.element.querySelector(".e-dialog-parent").appendChild(row);
let container: HTMLElement = createElement("div", {
className: "custom-field-container"
});
let inputEle: HTMLInputElement = createElement("input", {
className: "e-field",
attrs: { name: "Number" }
}) as HTMLInputElement;
container.appendChild(inputEle);
row.appendChild(container);
let nmeric: NumericTextBox = new NumericTextBox({
value: parseInt(
(args.data as { [key: string]: Object }).Number as any,
10
)
});
nmeric.appendTo(inputEle);
inputEle.setAttribute("name", "Number");
}
}
}
In the above sample, we are storing the number value in the events data source by maintaining the filed as Number.
Kindly check the above sample and get back to us if you need any further assistance.
Regards,
Vengatesh