Welcome Guest Search | Active Topics | Sign In | Register

Using calender.selecteddates with future date Options
Pg_dk
Posted: Sunday, January 18, 2009 9:12:04 AM
Rank: Newbie
Groups: Member

Joined: 1/18/2009
Posts: 2
When i am parsing DatePicker.SelectedDates.Add(future.datetime) with are future date is it showing today date, however when im using a date i the past to the datepicker is working properly.

best regards
eo_support
Posted: Sunday, January 18, 2009 11:02:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

This is normal if you also set SelectedDate/SelectedDates elsewhere (typically through .aspx). In this case the SelectedDates will have multiple values. Multiple SelectedDate value is only used by Calendar, not by DatePicker. DatePicker uses the earliest date in SelectedDates. So if you already set SelectedDate/SelectedDates to have the current date elsewhere and then call SelectedDates.Add to provide more value, if that new value is earlier than what you already have, that value will be displayed; if it is later, then the original value will be displayed.

To avoid this problem, use DatePicker.SelectedDate = future.DateTime. Do not use SelectedDate.Add.

Hope this helps.

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.