2

I have raddatepicker control in radwindow.The size of radwindow is fixed. when i open the raddatepicker popup it shows scroll bar in radwindow due to less space.

I don't want to show the scroll bar. so my question is Can we open the datepicker popup upon the radwindow.

scroll bar when datepicker popup is open

Jagz W
  • 855
  • 3
  • 12
  • 28

3 Answers3

1

Use the ContentTemplate of the RadWindow to have all controls inside on the same page, instead of in an iframe: http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx.

rdmptn
  • 5,413
  • 1
  • 16
  • 29
0

RadDatePicker has PopupDirection property. You can use TopLeft to popup top instead of bottom.

<telerik:RadDatePicker runat="server" ID="RadDatePicker1" PopupDirection="TopLeft">
</telerik:RadDatePicker>
  • TopLeft
  • TopRight
  • BottomLeft
  • BottomRight (Default)
Win
  • 61,100
  • 13
  • 102
  • 181
0

You can omit scroll bars by changing the position of the RadDatePicker popup.

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> 

You can popup position by changing datePicker.showPopup(width,height);

ex.

datePicker.showPopup(position.x-100, position.y - 100);
Nishantha
  • 6,065
  • 6
  • 33
  • 51