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

RadDatePicker Styling

9 Answers 358 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Pierre-Yves
Top achievements
Rank 1
Pierre-Yves asked on 11 Aug 2008, 08:24 PM
Hi,

I'm trying to style the RadDatePicker control but it doesn't work, could you provide a sample?

I would like to make the calendar drop down smaller by changing the size of the day cells.

Thanks,

Pierre-Yves Troel
Ayuda Media Systems

9 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 12 Aug 2008, 11:35 AM
Hi Pierre-Yves,

We are currently working on the help articles about styling the different controls. In the meantime changing the DatePicker might not be so easy. I created a project in blend in which I have changed the skin of the DatePicker (textbox + ToggleButton) and also made the dates smaller, as you wanted.

How did I do this? There is a margin around the ContentPresenter of the DayButton which I decreased by 2 pixels. Then, I modified the MinWidth and MinHeight of the CalendarViews to accommodate the change.

I have attached the completed project.

Normally it is much easier to edit the Calendar and then move the templates/styles to a DatePicker.

Here is a picture of the smaller Calendar and skinned DatePicker.



If you need help with skinning the controls, do come back to us.

Regards,
Miroslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pierre-Yves
Top achievements
Rank 1
answered on 25 Aug 2008, 07:44 PM
Thanks for the sample, sorry about not giving you feedback earlier but I was quite busy for the last few weeks.

I have another question, I'd like to force the calendar popup to appear with a certain alignment. I would like to force it to appear on top and right aligned with the datepicker, is this feasable?
The reason I want to do this is because I have a virtualearth control over my silverlight app and the popup appears under it when it is left aligned with the datepicker.

Thanks,

Pierre-Yves Troel
Ayuda Media Systems
0
Miroslav
Telerik team
answered on 26 Aug 2008, 07:05 AM
Hello Pierre-Yves,

The DatePicker uses RadPopup which has a Placement property which can automatically place the Calendar with the following alignment: Top, Bottom, Left, Right.

I have attached the project with the altered skin that now has that property set to Top (you can search for Placement="Top" in the solution.

If you need more control over the placement, you can use the HorizontalOffset and VerticalOffset properties of the Popup which position the calendar at these offset coordinates relative to the origin (0,0) of the datePicker.

Hopefully this is what you need,
 
Best wishes,
Miroslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Amir
Top achievements
Rank 1
answered on 26 Jan 2009, 04:50 PM
Hi,

Is there a way to retrieve the default template for RadDatePicker or any other Telerik control?

I am familiar with updating control templates by hand without Blend.

Cheers,


0
Hristo
Telerik team
answered on 30 Jan 2009, 07:38 AM
Hello Amir,

We are working on improving compatibility of our controls with Microsoft Expression Blend 2. With the next official build you will be able to edit the control template directly in Blend.
For now the only way of getting the templates is to open the assembly in Reflector and from Resources node you will see all styles defined in this assembly. Then you can save the resource as a file and edit it in Visual Studio.

Sorry for the inconvenience.

All the best,
Hristo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ronald
Top achievements
Rank 1
answered on 10 Jun 2009, 12:58 PM
Is there a way to change the background color of the text box?  Setting the Background attribute changes the background color of the calendar, but not the text box.  In particular, I'm looking for an easy way to do this in code to signify the field is required based on conditional criteria.
0
Boyan
Telerik team
answered on 11 Jun 2009, 02:42 PM
Hello Ronald,

Setting a background color should change the color of the Textbox as well. This was working fine at our side, I tested it with SP2 assemblies . I attached an image with the result by just setting Background ="Cyan". You can see that both Textbox and Calendar background have been changed.

Greetings,
Boyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kasturi Chatterjee
Top achievements
Rank 1
answered on 25 Aug 2009, 07:28 AM
How to set maximum length of characters in telerik RadDatePicker since MaxLength is not here????
0
Kaloyan
Telerik team
answered on 27 Aug 2009, 09:32 AM
Hi Kasturi Chatterjee,

There is not possible way to set a maximum length of characters, while the RadDatePicker displays only a DateTime object.

Sincerely yours,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
DatePicker
Asked by
Pierre-Yves
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Pierre-Yves
Top achievements
Rank 1
Amir
Top achievements
Rank 1
Hristo
Telerik team
Ronald
Top achievements
Rank 1
Boyan
Telerik team
Kasturi Chatterjee
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or