I am having a pretty big issue with the calendar control for my web site (http://www.rankingshq.com/public/eventcalendar.aspx).
So basically a visitor will navigate to a month and then click on the "Go" button which is meant to refresh the tournament calendar and filter by the month they have navigated to.
The issue is that the user will not select a specific day on the calendar. They only care about the month they have navigated to. So when I try to access the current month in the code behind I am unable to get the month they have navigated to, it keeps on referencing the month which has a selected day in it...I have pasted the lines of code that perform the filter below.
if (chkIncludeCalendar.Checked) |
{ |
//DateTime selectedMonthStart = new DateTime(eventCalendar.CalendarView.ViewStartDate.Year, eventCalendar.SelectedDate.Month, 1); |
filter.AddWithAnd(TournamentFields.StartDate >= eventCalendar.CalendarView.ViewStartDate); |
filter.AddWithAnd(TournamentFields.StartDate <= eventCalendar.CalendarView.ViewEndDate); |
} |
So if I want to reference the month that has been navigated to, is this possible without the user being forced to selected a specific day in that month?
Regards,
Andrew Galea