Search code examples
htmlangularcalendarejssyncfusion

Disable date-picker in ejs-calendar


On clicking the month name in the normal ejs calendar, a grid system is displayed that offers to switch the month & year. I want to disable it.

<div id="container">
      <ejs-calendar
        #calendarObj
        [firstDayOfWeek]="1"
        dayHeaderFormat="narrow"
        (renderDayCell)="highlightWeekend($event)"
        [values]="date"
        [isMultiSelection]="isMultiSelection"
        [showTodayButton]="false"
        (created)="onCreated($event)"
        (change)="onClick($event)"
      >
      </ejs-calendar>
    </div>

enter image description here


Solution

  • We can disable any pointer events on title of the calendar. Add this to your component.css file

    .e-title { pointer-events: none !important; }