Date within month calender selection range
Okay, this seems like a simple issue, but i want to iterate through each date that is selected on a month calender control. Am I missing something obvious?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Jul 31, 2009, 10:36 PM EDT
private void button1_Click(object sender, EventArgs e){
DateTime start = monthCalendar1.SelectionRange.Start;
DateTime end = monthCalendar1.SelectionRange.End;
for (DateTime d = start.Date; d <= end.Date; d= d.AddDays(1))
{
listBox1.Items.Add(d.Date.ToString());
}
}
patrickRank #4,458 · 342 reputationPosted Aug 3, 2009, 6:21 PM EDT