I would like to make the calendar show particular month and I would like to define range of allowed dates in calendar
DateTime today = DateTime.Today;
DatePickerDialog dateDialog = new DatePickerDialog(this, this.OnToDateSet, today.Year, today.Month - 1, today.Day);
dateDialog.DatePicker.MaxDate = DateTime.Today.Millisecond;
dateDialog.DatePicker.MinDate = new DateTime(today.Year, today.Month - 2, today.Day).Millisecond;
dateDialog.Show();
this is what I get in return ... it shows the wrong year & month when it appears
if I comment out maxdate and mindate then calendar opens at right year and month
Somebody please clarify