2013-05-13 278 views

回答

0

RadDatePickerPopupDirection財產。您可以使用TopLeft彈出頂部而不是底部。

<telerik:RadDatePicker runat="server" ID="RadDatePicker1" PopupDirection="TopLeft"> 
</telerik:RadDatePicker> 
  • 左上
  • TopRight
  • BOTTOMLEFT
  • BottomRight(默認)
+0

我試過了,但它沒有解決問題。現在隱藏日曆的上半部分。 – 2013-05-13 05:46:53

0

您可以通過更改RadDatePicker彈出框的位置來忽略滾動條。

The solution I found here.

.aspx.cs

protected void Page_Load(object sender, EventArgs e) 
{ 
    RadDatePicker1.DatePopupButton.Attributes.Add("onclick", "PopupAbove(event, '" + RadDatePicker1.ClientID + "');return false;"); 
} 

的.aspx

<telerik:RadDatePicker ID="RadDatePicker1" Runat="server"> 
</telerik:RadDatePicker> 

的.aspx的JavaScript

<script type="text/javascript"> 
function PopupAbove(e, pickerID) 
{ 
    var datePicker; 
    if (pickerID == null) 
    { 
     datePicker = $find("<%= RadDatePicker1.ClientID %>"); 
    } 
    else 
    { 
     datePicker = $find(pickerID); 
    }  
    var textBox = datePicker.get_textBox(); 
    var popupElement = datePicker.get_popupContainer();  
    var dimensions = datePicker.getElementDimensions(popupElement); 
    var position = datePicker.getElementPosition(textBox);  
    datePicker.showPopup(position.x, position.y - dimensions.height);  
} 
</script> 

你可以通過改變彈出位置

ex。

datePicker.showPopup(position.x-100, position.y - 100); 
相關問題