Disable single and double clicks

Is there a way to disable single and double clicking in the schedular? I only want the option to drag and drop appointments. Readonly does a good job but this also disables drag and drop. 


So i want people not to add appoi


1 Reply 1 reply marked as answer

SK Satheesh Kumar Balasubramanian Syncfusion Team July 22, 2022 12:32 PM UTC

Hi Frank,

 

Greetings from Syncfusion support.

 

You can disable cell click and cell double clicks actions in the Schedule by setting up args.cancel value to true on the cellClick and cellDoubleClick events of the schedule as shown in the below code snippet.


App.vue:

<template>

  <div id="app">

    <div id="container" style="margin: 50px auto 0; width: 100%">

      <ejs-schedule height="550px" :selectedDate='selectedDate' :eventSettings='eventSettings' :cellClick="onCellClick" :cellDoubleClick="onCellDoubleClick"></ejs-schedule>

    </div>

  </div>

</template>

<script>

 

export default {

  name: "app",

  data () {

    return {

      selectedDate: new Date(2018, 1, 15),

      eventSettings: {

        dataSource: [{

          Id: 1,

          Subject: 'Meeting',

          StartTime: new Date(2018, 1, 15, 10, 0),

          EndTime: new Date(2018, 1, 15, 12, 30)

        }]

      }

    }

  },

  methods: {

    onCellDoubleClick: function (args) {

        args.cancel = true;

    },

    onCellClick: function (args) {

        args.cancel = true;

    },

  },

  provide: {

    schedule: [Day, Week, WorkWeek, Month, Agenda],

  },

};

</script>

 

https://ej2.syncfusion.com/vue/documentation/api/schedule#celldoubleclick

 

Kindly try the attached sample and let us know if this meets your requirement.

 

Regards,

Satheesh Kumar B


Attachment: ej2vue2schedule_9777a807.zip

Marked as answer
Loader.
Up arrow icon