Events objects are missing 'Editable' property
See original GitHub issueReduced Test Case
Most relevant part of the test case above :
Having this basic setup :
initialEvents: EventInput[] = [
{
title: 'Event 0',
start: '2021-02-22T10:00:00',
end: '2021-02-22T12:00:00',
editable: false
},
{
title: 'Event 1',
start: TODAY_STR + 'T12:00:00',
end: TODAY_STR + 'T16:00:00',
},
{
title: 'Event 2',
start: '2021-02-24T09:00:00',
end: '2021-02-26T12:00:00',
}
]
with this in my calendar options :
// ...
initialView: 'timeGridWeek',
initialEvents: this.initialEvents,
eventClick: this.handleEventClick.bind(this),
// ...
and this method :
handleEventClick(clickInfo: EventClickArg): void {
console.log(clickInfo.event);
console.log(clickInfo.event.editable);
if (confirm(`Are you sure you want to delete the event '${clickInfo.event.title}'`)) {
if (clickInfo.event.editable) {
clickInfo.event.remove();
} else {
alert('Editable events cannot be removed');
}
}
}
Bug Description
It seems the EventApi
event fom my clickInfo
works almost fine, it contains almost all the properties stated in the documentation there : https://fullcalendar.io/docs/event-object
Except it’s missing the properties editable
and resourceEditable
.
When I click an event to remove it, the editable property is always undefined.
They are also missing in the EventApi
class found in the ...\node_modules\@fullcalendar\common\main.d.ts
file.
So how can I access the editable property of my event when I click it ?
(I’m using the v5.5.0 with angular)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
FullCalendar events are missing 'Editable' field?
So how can I access the editable property of my event when I click it ? (I'm using the v5.5.0 with angular). javascript...
Read more >Solved: Parse JSON Schema - Required properties are missin...
Parse JSON Schema - Required properties are missing from object. ... Edit the schema to change the type designator for those properties to ......
Read more >Event | Object Reference for the Salesforce Platform
Represents an event in the calendar. In the user interface, event and task records are collectively referred to as activities.
Read more >Component Events - Ignition User Manual 7.9
This event occurs when a component that had the input focus lost it to another component. Event Object Properties. Properties. Description ...
Read more >SyntaxError: missing } after property list - JavaScript | MDN
There is a mistake in the object initializer syntax somewhere. Might be in fact a missing curly bracket, but could also be a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Events have
durationEditable
for if the duration can be edited. They don’t actually have aneditable
property, that is just a shortcut option that sets bothstartEditable
anddurationEditable
.Same problem here. See https://fullcalendar.io/docs/event-object editable is clearly documented as a property of the Event object. Nonetheless, attempting to get it always returns undefined even if it was present in the parsed object. This is definitely a bug.