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

Setting width and height for RadDatePicker in Javascript

1 Answer 86 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 02 Dec 2008, 12:44 AM
Hi

I am using currently using Telerik controls 2008.2.826.35.

Is there a way to use Javascript to set the width and the height of a RadDatePicker?

I read the documentation but there doesn't seem to be any set_width() and set_height() methods.


Kind regards

Mark Eaton

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 02 Dec 2008, 08:50 AM
Hello Mark,

You can set the width/height of the nested DateInput element:
<input type="button" value="Resize" onclick="ChangeSize()" /> 
<telerik:RadDatePicker ID="RadDatePicker1" runat="server"
</telerik:RadDatePicker> 

<script type="text/javascript" language="javascript"
    function ChangeSize() 
    { 
        var picker = $find('<%= RadDatePicker1.ClientID %>'); 
        picker.get_dateInput()._originalTextBoxCssText = "width: 300px; height: 80px;"
        picker.get_dateInput().updateCssClass(); 
    } 
</script> 

Let me know whether this helps.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Mark
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or