Block weekends on scheduler grid

Hi,

I want to block weekends on scheduler grid, that is weekend should be visible but enabling of adding any event should be blocked just like blocking of dates


2 Replies

ST Swati Thorali November 23, 2022 05:39 AM UTC

Please reply Asap



SR Swathi Ravi Syncfusion Team November 24, 2022 12:54 PM UTC

Hi Swati,


You can prevent adding appointments on weekends to the scheduler with the help of the block appointment as shown in the below snippet.


Sample: https://stackblitz.com/edit/angular-o8nrhj?file=data.ts

UG: https://ej2.syncfusion.com/angular/documentation/schedule/appointments/#block-dates-and-times

Demo: https://ej2.syncfusion.com/angular/demos/#/material/schedule/block-events


[data.ts]

export let scheduleDataRecord<stringany>[] = [

  {

    Id: 1,

    Subject: 'Block Appointment',

    StartTime: new Date(202103,),

    EndTime: new Date(202103),

    IsAllDay: true,

    RecurrenceRule: "FREQ=WEEKLY;BYDAY=SU,SA;INTERVAL=1;",

    IsBlock: true

  }

];


Regards,

Swathi Ravi


Loader.
Up arrow icon