DatePicker ButtonsPosition Issue

6 posts, 0 answers
  1. Paige Cook
    Paige Cook avatar
    57 posts
    Member since:
    Sep 2007

    Posted 14 Dec 2007 Link to this post

    I have added a date picker and want to position the button to the left of the input box, so I am using the following markup in my aspx page, but the image button is always displaying to the right of my textbox. Am I missing something?

    <telerik:RadDatePicker ID="RadDatePicker2" runat="server" >
    <DateInput ID="DateInput2" runat="server" ButtonsPosition="Left"></DateInput>           
    </telerik:RadDatePicker>

  2. Steve
    Admin
    Steve avatar
    10940 posts

    Posted 14 Dec 2007 Link to this post

    Hello Paige,

    This functionality is not available out of the box, but can be achieved with a few css hacks:

    <style type="text/css" >
    .pickerWrapper_Default table
    {
    direction:rtl;       
    }   
    .radInput_Default .inputCell
    {
    padding: 0 5px 0 5px !important;
    }
    </style>

    Note that this is Skin dependent and the paddings might differ on different skin and sizes of the input.

    All the best,
    Steve
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Paige Cook
    Paige Cook avatar
    57 posts
    Member since:
    Sep 2007

    Posted 14 Dec 2007 Link to this post

    Awesome, thanks for the quick reply Steve. This works to move the button, but if I also have a label on my DatePicker control, it moves that over to the right, as it is obviously following the rtl direction style as well. But not a big deal, I will just create a separate label for my control. Thanks again.
  4. Falgun
    Falgun avatar
    8 posts
    Member since:
    Sep 2008

    Posted 24 Sep 2008 Link to this post

    I happened to run in the simmiler issue... and it works fine for normal scenerio.. in my case, I have 4 calendar controls on my page, out of which 2 needs to show image button on the left hand side, and 2 on the right hand side!!!! $0I would appreciate any help from you..$0$0$0$0$0Thanks$0
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Sep 2008 Link to this post

    Hello Falgun,

    You can try setting CssClasses for the controls that you want to show the image buttons on the left as shown below.
    aspx:
     <telerik:RadDatePicker CssClass="Calendar1" ID="RadDatePicker1" runat="server"
     </telerik:RadDatePicker> 

    css:
    <head runat="server">     
       <style type="text/css"
     
        .Calendar1 
        { 
         direction:rtl; 
        } 
       
        </style>     
    </head> 

    Thanks
    Princy.
  6. Falgun
    Falgun avatar
    8 posts
    Member since:
    Sep 2008

    Posted 25 Sep 2008 Link to this post

    Thanks Princy,
    yeah, I did it with a slightly more complicated way :)

    I used page.registerclientscriptblock() and added the <style> tag inside that... but yours is more cleaner approach...

    Thanks again,
    Falgun    
Back to Top