This is a migrated thread and some comments may be shown as answers.

display above text box

3 Answers 234 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Piyush Bhatt
Top achievements
Rank 2
Piyush Bhatt asked on 24 Jan 2008, 07:22 PM
How can I display Calendar above the text box? My Date Picker is at the bottom of the page and when I click on it I want to display calendar above the textbox instead of below it - to avoid scrolling.

What property can I use for that?
Thanks,
Piyush

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 25 Jan 2008, 11:32 AM
Hi Piyush,

Please check the following code library  which describes different options for setting the pop up Calendar  in RadDatePicker

Let us know if this helps.

Kind regards,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 1
answered on 30 Jun 2008, 06:36 PM

I am still learning and discovering your Telerik controls, but I came across a few threads with people trying to figure out how to position the picker popup calendar.

I am truly surprised that your examples and solution to the positioning is use javascript to change the position.

    protected void Page_Load(object sender, EventArgs e)  
    {  
        rdpStart.DatePopupButton.Attributes.Add("onclick""PopupAbove(event, '" + rdpStart.ClientID + "')");  
        rdpEnd.DatePopupButton.Attributes.Add("onclick""PopupAbove(event, '" + rdpEnd.ClientID + "')");  
    } 
 
and the following javascript to alter the position:
        /**Force DatePicker Popup to show above TextBox**/ 
        function PopupAbove(e, pickerID)  
        {  
            var datePicker;  
 
                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);  
        }  

I just can't believe that is what it takes to posiiton this datepicker.  Has their been any improvement on this or not yet?

Here is a link to the ASP.NET AJAX Control Toolkit for their Calendar and you will notice that control has a PopupPosition property with the following value options:

Indicates where the calendar popup should appear at the BottomLeft(default), BottomRight, TopLeft, TopRight, Left or Right of the TextBox.

You should do something similar and maybe call the property PopupPosition.  Hope to see something like this in the future.

Thank you.
0
Steve
Telerik team
answered on 01 Jul 2008, 06:38 AM
Hi Michael,

We have this suggestion logged in our features list for quite some time now, but due to the tight schedules and other important functionalities and fixes we provide for the releases, it has not made it to our TODO list yet. However we have plans to include it in one of the subsequent versions of the calendar control, just cannot engage with a specific timeframe at this moment.

Sorry for the inconvenience and thank you for the understanding.

Regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Calendar
Asked by
Piyush Bhatt
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Michael
Top achievements
Rank 1
Steve
Telerik team
Share this question
or