Welcome Guest Search | Active Topics | Sign In | Register

DatePicker Error Options
eo_support
Posted: Wednesday, July 16, 2008 2:59:15 PM
Rank: Administration
Groups: Administration

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

We debugged into it and noticed that the first parameter you passed to g_curCalendar.showContextMenu is wrong. You passed monthPicker, which has the same value for both pickers. This parameter is used to provide a "reference element" to showContextMenu. So if you pass both Calendar the same value the context menu will be displayed at the same location.

The solution is to give them different values based on calendarId, by using exactly the same technique you used to access different menus inside ShowMonthPopup based on different calendarId.

Thanks
Posted: Thursday, July 17, 2008 5:21:05 AM
Rank: Member
Groups: Member

Joined: 4/18/2008
Posts: 19
I am really confused!

How do use the same technique that I used to access the calendarId when the yearPicker links are rendered twice, both having the same id. It is not like the calendar controls where they are rendered with different id's such as ctl00_contentPlaceHolder_createModifyControl_expectedEffectiveDateDatePicker_dateOEDatePicker
and
ctl00_contentPlaceHolder_createModifyControl_requestedEffectiveDateDatePicker_dateOEDatePicker

When looking at the page's view source, you will see that the anchor tags both have the same id of 'yearPicker' and 'monthPicker'. When calling getElementById what is returned is
javascript:ShowYearPopup5('yearPicker',%20eo_GetObject('ctl00_contentPlaceHolder_createModifyControl_requestedEffectiveDateDatePicker_dateOEDatePicker').getId());

With all that said, I can not go about solving this in the same manner as I did with the calendarId because I don't know/have a way of differentiating one yearPicker from the other by simply looking it the id.

Can you please be more detailed on how to accomplish this?
eo_support
Posted: Thursday, July 17, 2008 7:36:39 AM
Rank: Administration
Groups: Administration

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

Try something like this:

Code: HTML/ASPX
<a id="{var:calendar_id}_monthPicker" ....>

<eo:DatePicker ClientSideOnEvalVar="EvalCalendarVar" ....>
....
</eo:DatePicker>


Code: JavaScript
function EvalCalendarVar(ctrl, name, format)
{
    if (name == "calendar_id")
       return ctrl.getId();
}


Thanks
Posted: Thursday, July 17, 2008 8:23:01 AM
Rank: Member
Groups: Member

Joined: 4/18/2008
Posts: 19
Thank you so much!!Angel


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.