How to disable future months in DatePicker?

I am using Angular DatePicker for month selection. How can I disable future months in the DatePicker?

          <ejs-datepicker
            depth="Year"
            format="MM/yyyy"
            formControlName="selectedMonth"
            floatLabelType="Auto"
            [max]="maxDate"
            start="Year"
            [width]="datePickerWidth"
          >
          </ejs-datepicker>

1 Reply 1 reply marked as answer

SP Sureshkumar P Syncfusion Team September 30, 2022 10:30 AM UTC

Hi Amarender,

You can use the Min and Max property to restrict the selection in the datepicker component. To know more about min and max property, please refer to the below documentation and online demo links.

Documentation:

Documentation: https://ej2.syncfusion.com/angular/documentation/datepicker/date-range/

Online demo: https://ej2.syncfusion.com/angular/demos/#/bootstrap5/datepicker/date-range

Regards,

Sureshkumar P


Marked as answer
Loader.
Up arrow icon