Welcome Guest Search | Active Topics | Sign In | Register

Help with SelectedDays Options
David Ranglos
Posted: Thursday, February 26, 2009 6:49:50 PM
Rank: Newbie
Groups: Member

Joined: 2/26/2009
Posts: 3
I have three values

StartDate
EndDate
Length

I have bound the SelectedDay and the VisibleDay to the StartDate works fine.


What eles can I bind to get the EndDate to display with the same properties as the SelectedDay and the VisibleDay?
eo_support
Posted: Thursday, February 26, 2009 6:57:18 PM
Rank: Administration
Groups: Administration

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

I am not sure if I understand your question. I assume you are using our Calendar/DatePicker control, however what do you mean by "to get EndDate to display with the same properties...."? Please let us know exactly what you are trying to do and how you wanted it to work.

Thanks!
David Ranglos
Posted: Friday, February 27, 2009 12:59:38 AM
Rank: Newbie
Groups: Member

Joined: 2/26/2009
Posts: 3
Sorry! Yes I am using the Calendar Control.... No date picker
My values are StartDate, EndDate, Length. Length is

Working inside a formView with a template...

<eo:Calendar ID="Calendar1" runat="server" defaultmode="readonly" ControlSkinID="None"
DisabledDates=""SelectedDate='<%# Eval("StartDate") %>' SelectedDates=""
VisibleDate='<%# Eval("StartDate") %>' AllowMultiSelect="False"

The Calendar Above displays the SelectedDate which in this case is the StartDate with the properties set using SelectedDayStyle.

Now I need to style each day cell between and including the SelectedDate and the EndDate for each row in the data set

Clear as Mud!
eo_support
Posted: Friday, February 27, 2009 8:34:50 AM
Rank: Administration
Groups: Administration

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

You will need to do that with code, not binding expression. It will be something like this:

Code: C#
//Get start date and end date from your data source
DateTime startDate = GetStartDate();
DateTime endDate = GetEndDate();

//Assign it to the calendar
Calendar1.SelectedDates.SelectRange(startDate, endDate);


Hope this helps.

Thanks!

David Ranglos
Posted: Monday, March 2, 2009 12:04:25 AM
Rank: Newbie
Groups: Member

Joined: 2/26/2009
Posts: 3
Thanks I will begin working on it....


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.