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.

How to disable a particluar event from dragging in v3.0.1

See original GitHub issue

Hi @arshaw ,

I am using release 3.0.1 of ui-calender. My uiConfig file is like this -

 this.uiConfig = {
      calendar: {
        height: 'auto',
        editable: false,
        eventStartEditable  : true,
        header: {
          right: '',
          center: 'title',
          left: 'title,prev,next'
        },
        eventClick: function (calEvent, jsEvent, view) {
          vm.openSlotDialog(calEvent);
        },
        eventDrop: function(event, delta, revertFunc) {
                console.log("After drop this is called");
        },
        eventAllow: function(dropLocation, draggedEvent) { 
                      return  vm.calenderEventAllow(dropLocation, draggedEvent);                      
        },

image

But how to disable dragging for a particular event not the other events.

Like green events i want to drag , but not the orange ones.

Thanks in advance…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
Sandip9021commented, Jan 13, 2018

Hi @vaibhavshaha ,
when you will create event object for your calendar like below this.events.push({ id: meeting.id, title: “meeting 1”, start: meetingStartDate, editable: false }); make this editable field as false for not dragging and make it true for dragging.

1reaction
taublastcommented, Jul 14, 2018

do not forget to set startEditable = false; if you had it set to true in-before…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Full calendar v3 Specific event disable dragging
As you seem to have realised already, if you set an event's editable property to false , it will prevent it from being...
Read more >
Event Dragging & Resizing - Docs v3 - FullCalendar
Start by setting the editable setting to true . If you want to allow external elements to be dropped onto your calendar, visit...
Read more >
Drag and Drop Issue - How to disable drop targets
1) Create a "deleted" state for your drop target and you delete the element from the scene in this state. · 2) tell...
Read more >
Dragdealer.js – drag provider, the good stuff
bool disabled=false Init Dragdealer in a disabled state. The handle will have a .disabled class. bool horizontal=true Enable horizontal dragging.
Read more >
UIElement | LightningChart® JS API Documentation
UISpace): Point. Returns the position of this UiElement at given location relative to elements size. ... Remove event listener from Mouse Drag Start...
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