ShowNextMonthDays Property in Month-View and Year-View

Hello,


We need a way to hide the previous and following days in the year and month view. 

We need a functionality as described in this thread just for the scheduler:

https://support.syncfusion.com/kb/article/4643/how-to-restrict-the-visibility-of-the-days-in-wpf-calendaredit

Thank you in advance for your help!


Regards Adrien


1 Reply

SK Satheesh Kumar Balasubramanian Syncfusion Team November 7, 2023 01:55 PM UTC

Hi Adrien,

Currently, there is no built-in property to hide the previous and following days in the year and month view. But, you can hide the previous and following days in the year and month view as shown in the below customized styles.


index.ts:

let scheduleObj: Schedule = new Schedule({
  height: '650px',
  cssClass: 'year-month-customize',
  selectedDate: new Date(2021, 0, 10),
  eventSettings: { dataSource: data },
  views: ['Month', 'Year'],
  dragStart: (args: DragEventArgs) => {
    args.navigation.enable = true;
  },
});
scheduleObj.appendTo('#Schedule');

index.html:

    <style>
      body {
        touch-action: none;
      }
      .control-section {
        margin-top: 100px;
      }
      .year-month-customize.e-schedule .e-month-view .e-other-month,
      .year-month-customize.e-schedule
        .e-year-view
        .e-calendar-wrapper
        .e-month-calendar.e-calendar
        .e-other-month {
        visibility: hidden;
      }
      .year-month-customize.e-schedule .e-month-view .e-work-cells {
        border-width: 1px;
      }
    </style>

Regards,
Satheesh

Loader.
Up arrow icon