|
Rank: Advanced Member Groups: Member
Joined: 2/20/2008 Posts: 34
|
in the following two lines of code:
myEODatePicker.VisibleDate = DateTime.Parse("2008-04-14"); DateTime mydate = DateTime.Parse("2008-04-14");
myEODatePicker contains April 1st, 2008 not April 14? Why is this? Thanks, Gary
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi Gary,
This would be question for DateTime.Parse thus it is out of the scope of the support. Sorry about that!
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 2/20/2008 Posts: 34
|
I think you misunderstand, Datetime.parse is correctly interpreting the date string. It'l your DatePicker that is getting it wrong. I included the datetime.parse to show how it should be correctly parsed.
I give your control 04-14-2008 and it gets 04-01-2008 that's 13 days different.
Do I misunderstans? Thanks, Gary
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Ah! I did misunderstand. Apologize!
VisibleDate is more a month rather than a date. It is used to specify which month the Calendar shows. For example, setting VisibleDate to "2008/1/1" shows Jan, 2008. For that reason, VisibleDate only keeps the year and month value and ignores the day value.
You might be looking SelectedDate property. That property takes the full date.
Thanks!
|
|