RadDatePicker includes a strange single-pixel input box

4 posts, 0 answers
  1. Teun
    Teun avatar
    4 posts
    Member since:
    Dec 2007

    Posted 09 May 2008 Link to this post

    We've just upgraded from 2007 Q3 to 2008 Q1 (.NET Framework 3.5) and discovered that the first child of the RadDatePicker is an <input> element which height is 1 px. I don't understand why it's there, and it has no associated class or anything else that I can use to remove it through a CSS style. Since our layout is very tight, it really screws up our design. What is the purpose of this input field and how can I get rid of it?
  2. Dimo
    Admin
    Dimo avatar
    8472 posts

    Posted 09 May 2008 Link to this post

    Hi Dennis,

    The purpose of the invisible input element is to hold the actual datepicker value (not the parsed one that you are seeing in the textbox). The input must not have a display:none style, because popup extender validators will not work with the datepicker control.

    Indeed, it seems that in Internet Explorer this input pushes the control 1px downwards.

    Please try adding the following CSS rule and let us know whether it helps:

    #RadDatePicker1
    {
        margin-bottom: -1px !important;
    }

    RadDatePicker1 is the ClientID of the input element we are talking about.


    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Teun
    Teun avatar
    4 posts
    Member since:
    Dec 2007

    Posted 09 May 2008 Link to this post

    Yes, that does indeed move the entire back up one pixel. However, since the ClientID of our particular example is ctl00_ctl00_DefaultContent_DefaultContent_Definition_DatePicker1, I don't see how we can fix this for all date pickers. Why does the input element have a height of 1px instead of 0px?
  4. Dimo
    Admin
    Dimo avatar
    8472 posts

    Posted 09 May 2008 Link to this post

    Hi Dennis,

    The height is 1px because some browsers ignore zero dimensions for textboxes and the situation gets even worse.

    We will think about a better implementation of this whole scenario.


    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top