Welcome Guest Search | Active Topics | Sign In | Register

initializing datepicker Options
DeanBlakely
Posted: Sunday, August 10, 2008 1:00:39 PM
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
eo_support
Posted: Sunday, August 10, 2008 1:29:08 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi Gary,

This would be question for DateTime.Parse thus it is out of the scope of the support. Sorry about that!

Thanks
DeanBlakely
Posted: Sunday, August 10, 2008 2:02:10 PM
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
eo_support
Posted: Sunday, August 10, 2008 2:09:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.