RadMonthYearPicker TextBox width

6 posts, 1 answers
  1. Sonia
    Sonia avatar
    90 posts
    Member since:
    Mar 2012

    Posted 07 May 2013 Link to this post

    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.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 May 2013 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Giorgos
    Giorgos avatar
    18 posts
    Member since:
    Apr 2013

    Posted 14 Mar 2014 in reply to Princy Link to this post

    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?
  5. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Mar 2014 in reply to Giorgos Link to this post

    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.

  6. Giorgos
    Giorgos avatar
    18 posts
    Member since:
    Apr 2013

    Posted 14 Mar 2014 in reply to Princy Link to this post

    Hi Princy,

    thanks for the answer. It works for the RadMonthYearPicker control, but it unfortunately
    messes up all other textboxes contained of the page.
  7. Giorgos
    Giorgos avatar
    18 posts
    Member since:
    Apr 2013

    Posted 14 Mar 2014 in reply to Giorgos Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017