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

DatePicker ButtonsPosition Issue

5 Answers 189 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Paige Cook
Top achievements
Rank 2
Paige Cook asked on 14 Dec 2007, 03:41 PM
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>

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 Dec 2007, 04:24 PM
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
0
Paige Cook
Top achievements
Rank 2
answered on 14 Dec 2007, 04:34 PM
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.
0
Falgun
Top achievements
Rank 1
answered on 24 Sep 2008, 03:55 PM
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
0
Princy
Top achievements
Rank 2
answered on 25 Sep 2008, 08:06 AM
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.
0
Falgun
Top achievements
Rank 1
answered on 25 Sep 2008, 01:16 PM
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    
Tags
Calendar
Asked by
Paige Cook
Top achievements
Rank 2
Answers by
Steve
Telerik team
Paige Cook
Top achievements
Rank 2
Falgun
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or