Posted on: 4/26/2013 10:07:21 AM | Views : 340

I am using an ASP calendar to show a list of dates, however the way the calendar overlaps and may show the last few dates of March, with the entire month of April, with the first few days of may is causing a problem.
I have set the 'startDate' and 'endDate' to be the start and end of that month. So if the user clicks 10th April, it will show all the stored dates btn 1st april to the 30th april. I need to change this to include the month b4 and the month after, SO any date in april will include all of March, April and May. 
DateTime startOfMonth = new DateTime(DiaryDate.Year, DiaryDate.Month, 1); DateTime endOfMonth = startOfMonth.AddMonths(1).AddDays(-1); The above code selects the first and last date of each month (of the chosen date) I want to select the entire previous current and next month not sure on the correct syntax. any help appreciated?
...

Go to the complete details ...