I want to have edit/read-only button for the calendar.
Everything works, but when I change view/day after click then default name of the button got added to the custom one, like this: "stopedit" instead of just "stop"
Any idea how to resolve it?
customButtons: {
toggleEditButton: {
text: "edit",
click: function () {
if (calendar.getOption("editable")) {
calendar.setOption("editable", false);
calendar.setOption("selectable", false);
event.target.innerHTML = "edit";
} else {
calendar.setOption("editable", true);
calendar.setOption("selectable", true);
event.target.innerHTML = "stop";
}
}
}
}