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

RadMonthYearPicker TextBox width

6 Answers 102 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Sonia
Top achievements
Rank 1
Sonia asked on 07 May 2013, 07:07 AM
Hi,

Does anybody knows how I can change the width of the TextBox of the RadMonthYearPicker control?
I have tried with the property DateInput-Width but I cannot see any effect.

Thank you.

6 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 May 2013, 08:27 AM
Hi Sonia,

Simply set the width of the control as shown below.

ASPX:
<telerik:RadMonthYearPicker ID="RadMonthYearPicker1" runat="server" Width="500px">
</telerik:RadMonthYearPicker>

Thanks,
Princy.

0
Giorgos
Top achievements
Rank 1
answered on 14 Mar 2014, 08:00 AM
This way you set the width of the whole control, not only of the textbox. This can lead to 
formatting problems when you want to place the control, for example,  on a multi-column
page. Is there any way of setting the width of ONLY the textbox?
0
Accepted
Princy
Top achievements
Rank 2
answered on 14 Mar 2014, 09:47 AM
Hi Giorgos,

Please try the following CSS to change the width of the textbox in RadMonthYearPicker.

CSS:
<style type="text/css">
    .riTextBox
    {
        width: 500px !important;
    }
</style>

Thanks,
Pricny.

0
Giorgos
Top achievements
Rank 1
answered on 14 Mar 2014, 12:08 PM
Hi Princy,

thanks for the answer. It works for the RadMonthYearPicker control, but it unfortunately
messes up all other textboxes contained of the page.
0
Giorgos
Top achievements
Rank 1
answered on 14 Mar 2014, 01:14 PM
There is an easy work-around to fix the side effect of changing the RadMonthYearPicker TextBox's width: simply
use WrapperCssClass for every other textbox used on the page.
0
William
Top achievements
Rank 1
answered on 24 Jan 2019, 04:25 PM

If using CSS then might as well use a CSS Class and then in the asp.net page

<telerik:RadMonthYearPicker ID="RadMonthYearPicker1" CssClass="MyCustomWidth500px" runat="server">
</telerik:RadMonthYearPicker>

.CSS file

.MyCustomWidth500px { width: 500px !important; }

 

Tags
Calendar
Asked by
Sonia
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Giorgos
Top achievements
Rank 1
William
Top achievements
Rank 1
Share this question
or