Blocking the navigation from moving to the future month and years.
Description
Can you please block the future years and months of calendar used in igx-calendar component.
- igniteui-angular version: 6.1.1
- browser: Chrome
Steps to reproduce
1.Go to https://drgdnmjoqen.angular.stackblitz.io 2.Click right arrow for navigating the future years.
In the igx-calender only the current month and year should be enabled/displayed and all the future year and months on selection should be blocked or disabled.
Result
we can see that in igx-calendar display the future years and months when navigated.
Expected result
In the igx-calender only the current month and year should be enabled/displayed and all the future year and months on selection should be blocked or disabled.
Attachments
For now, the navigation cannot be prevented, but you can mark of the dates past a particular date as disabled, and end-users wouldn't be able to select a date from that time period.
public disabledDates: DateRangeDescriptor[] = [
{ type: DateRangeType.After, dateRange: [new Date()]}
];
@ViewChild("picker")
public picker: IgxCalendarComponent;
ngOnInit() {
this.picker.disabledDates = this.disabledDates;
}
Btw, the disabledDates were implemented after 6.1.1 (introduced in 6.2.0), so you would have to ng update in order to use them.
@Shikhajaiswal123 hi i'm closing this issue reopen if you need more clarification