RadDatePicker Styling

10 posts, 0 answers
  1. Pierre-Yves
    Pierre-Yves avatar
    2 posts
    Member since:
    Jun 2008

    Posted 11 Aug 2008 Link to this post

    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
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 12 Aug 2008 Link to this post

    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.
  3. DevCraft banner
  4. Pierre-Yves
    Pierre-Yves avatar
    2 posts
    Member since:
    Jun 2008

    Posted 25 Aug 2008 Link to this post

    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
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 26 Aug 2008 Link to this post

    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.
  6. Amir
    Amir avatar
    13 posts
    Member since:
    Apr 2008

    Posted 26 Jan 2009 Link to this post

    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,


  7. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 30 Jan 2009 Link to this post

    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.
  8. Ronald
    Ronald avatar
    4 posts
    Member since:
    May 2009

    Posted 10 Jun 2009 Link to this post

    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.
  9. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 11 Jun 2009 Link to this post

    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.
  10. Kasturi Chatterjee
    Kasturi Chatterjee avatar
    1 posts
    Member since:
    Aug 2009

    Posted 25 Aug 2009 Link to this post

    How to set maximum length of characters in telerik RadDatePicker since MaxLength is not here????
  11. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 27 Aug 2009 Link to this post

    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.
Back to Top
DevCraft banner