By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,263 Members | 1,574 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,263 IT Pros & Developers. It's quick & easy.

c# MonthCalendar check if date falls in selection

P: 5
I was wondering if there is an easy way to check if a date falls in a given selection range. I have the selection range already made and I want to be able to take a given date and see if it falls within that range.

Thank you,
-Dean Miller
Mar 15 '07 #1
Share this Question
Share on Google+
1 Reply

P: 5
Well I figured out a way to do it but if someone can find an easier way let me know. This is the method I created.

bool found = false;
DateTime test = monthCalendar1.SelectionStart;
for (int i = 0; i < counter; i++)
if (test.Date.CompareTo(com.Date) == 0)
found = true;
test = test.AddDays(1);
return found;
Mar 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.