Hello,
Is there anyway to prevent the user from selecting the current and future month while allowing the user to select the last six months from an SFDatePicker?
<label class="example-label">Report Date</label>
<SfDatePicker TValue="DateTime?" Format="MMMM yyyy" Placeholder="Choose a Month" Start="CalendarView.Year" Depth="CalendarView.Year" ShowClearButton="true">
<DatePickerEvents TValue="DateTime?" ValueChange="OnChange"></DatePickerEvents>
</SfDatePicker>
public void OnChange(ChangedEventArgs<DateTime?> args)
{
DateTime lastDay = new DateTime(args.Value.Value.Year, args.Value.Value.Month + 1, 1).AddDays(-1);
SelectedValue = lastDay.ToString("dd-MMM-yy");
this.ODGrid.FilterByColumnAsync("ReportDate", "equal", @SelectedValue);
var Count = 0;
var CurrentMonth = CurrentDate.Value.Month;
}
Regards