|
Rank: Advanced Member Groups: Member
Joined: 12/26/2008 Posts: 45
|
If Calendar is positioned on bottom of page then expand direction should be to Up.
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="TestPage.aspx.cs" Inherits="DocumentPortal.TestPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" >
<Scripts>
</Scripts>
</asp:ScriptManager>
<eo:PopupCalendar ClientSideOnSelect="DPDateTimeCalendarDaySelected" ID="popupCalendarForDateTime" runat="server" Width="100px" PopupExpandDirection="Auto"
ControlSkinID="None" DayCellHeight="15" DayCellWidth="31"
DayHeaderFormat="Short" DisabledDates="" OtherMonthDayVisible="True"
SelectedDates="" TitleFormat="MMMM, yyyy"
TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
TitleRightArrowImageUrl="DefaultSubMenuIcon" VisibleDate="2009-10-01">
<TodayStyle CssClass="Calendar_TodayStyle" />
<SelectedDayStyle CssClass="Calendar_SelectedDayStyle" />
<DisabledDayStyle CssClass="Calendar_DisabledDayStyle" />
<FooterTemplate>
<table border="0" cellPadding="0" cellspacing="5"
style="font-size: 11px; font-family: Verdana">
<tr>
<td width="30">
</td>
<td valign="center">
<img src="{img:00040401}"></img></td>
<td valign="center">
Today: {var:today:MM/dd/yyyy}</td>
</tr>
</table>
</FooterTemplate>
<CalendarStyle CssText="background-color:white;border-bottom-color:Silver;border-bottom-style:solid;border-bottom-width:1px;border-left-color:Silver;border-left-style:solid;border-left-width:1px;border-right-color:Silver;border-right-style:solid;border-right-width:1px;border-top-color:Silver;border-top-style:solid;border-top-width:1px;color:#2C0B1E;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px; " />
<TitleArrowStyle CssText="cursor: hand" />
<DayHoverStyle CssText="font-family:Tahoma;font-size:8pt;background-image:url('00040402');color:#1c7cdc;" />
<MonthStyle CssText="cursor:hand;margin-bottom:0px;margin-left:4px;margin-right:4px;margin-top:0px;" />
<TitleStyle CssText="font-family:Tahoma;font-size:8.75pt;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
<DayHeaderStyle CssText="font-family:Tahoma;font-size:8pt;border-bottom: #f5f5f5 1px solid" />
<DayStyle CssText="font-family:Tahoma;font-size:8pt;" />
</eo:PopupCalendar>
<div id="qwe" style="background-color:Gray; width:404px; height:800px;" >
<div style="position:relative; top:700px;">
<asp:TextBox runat="server" ID="testTxt"></asp:TextBox>
<asp:Button runat="server" OnClientClick="eo_ShowPopupCalendar('popupCalendarForDateTime', 'testTxt'); return false;" Text="Show" />
</div>
</div>
</form>
</body>
</html>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Unlike menu, PopupCalendar/DatePicker doesn't automatically adjust popup location based on window size. Setting ExpandDirection to "Auto" is the same as setting it to "Bottom". One of the reasons that it doesn't do so is because there is no clear definition of the "parent block". For example, if a sub menu does not have enough room to expand on the right side of the parent popup, then it will try to expand on the left side of the parent popup. However in case of a popup calendar, it does not know where this "left edge" is.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/26/2008 Posts: 45
|
Can i set ExpandDirection via Javascript?
In my case PopupCalendar place on MainPage and all ascx controls contain CallbackPanel. I use one instance of popup calendar for differenc buttons (because slow perfomance) and set on Page_Load of asxc control the property ExpandDirection - not worked.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
No. I don't believe you can set that property in JavaScript. We will look into it and see if we can add that.
Thanks!
|
|