question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Events objects are missing 'Editable' property

See original GitHub issue

Reduced Test Case

https://stackblitz.com/edit/full-calendar-bug-g2wnbi?file=src%2Fapp%2Fride-calendar%2Fride-calendar.component.ts

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
acerixcommented, Feb 26, 2021

Events have durationEditable for if the duration can be edited. They don’t actually have an editable property, that is just a shortcut option that sets both startEditable and durationEditable.

0reactions
anrikuncommented, Oct 17, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found