Sunday, September 1, 2013

Why can't get consistent e.End.ToString() with same date range selection on Month Calender control

Seems no one reported my problem...


I have a RSS reader. There is a Month Calender to let user to filter out RSS feeds.


I implemented following method:



private void mc1_DateSelected(object sender, DateRangeEventArgs e) {

textBox1.AppendText("Range:" + e.Start.ToString() + " - " + e.End.ToString() + "\r\n");
}

But I found a problem.


If I selected a series days (Max selection is 7 days by default) on Month Calender, like 2013/08/07 ~ 2013/08/13 some times the textBox1 will be like following what I want:


Range:2013/8/7 0:00:00 - 2013/8/13 23:59:59


some times the textBox1 will be like following what I think is wrong:


Range:2013/8/7 0:00:00 - 2013/8/13 00:00:00


Can any one help me out?


Thank you.


No comments:

Post a Comment