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

Blocked events on month view

How can we show events with property isBlock: true on month view?


1 Reply

RV Ravikumar Venkatesan Syncfusion Team March 23, 2023 12:23 PM UTC

Hi Sergiy,


Sample: https://stackblitz.com/edit/ej2-angular-schedule-block-appointment?file=src%2Fapp.component.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


You can show the block appointments in the Schedule month view by adding an appointment with the IsBlock field true in the Schedule dataSource as highlighted in the below code snippet.


[app.component.ts]

export class AppComponent {

  public selectedDateDate = new Date(2023216);

  public eventSettingsEventSettingsModel = {

    dataSource: [{

      Id: 1,

      Subject: "Blocked date",

      StartTime: new Date(2023216),

      EndTime: new Date(2023217),

      IsBlock: true

    }]

  };

}


Regards,

Ravikumar Venkatesan


Loader.
Live Chat Icon For mobile
Up arrow icon