We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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 12:39 AM

Please reply Asap



SR Swathi Ravi Syncfusion Team November 24, 2022 07:54 AM

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.
Live Chat Icon For mobile
Up arrow icon