Custom Skin needs to load last

3 posts, 1 answers
  1. Trent
    Trent avatar
    11 posts
    Member since:
    Apr 2010

    Posted 20 May 2010 Link to this post

    I have a custom calendar skin that I am using in the DatePicker control.  I call the stylesheet in the header, set the EnableEmbeddedSkins property to False, and enter the custom skin name in the Skin property.  When I run the application and open the calendar, the day row (SMTWTFS) is aligned to the right, which looks horrible.  If I move the stylesheet call into the body below the the scriptmanager, the calendar will display correctly.  It seems that the the default stylesheet is loading some styles after my custom styles and over-riding some of them them.  Is this a bug?  Thanks.
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8474 posts

    Posted 21 May 2010 Link to this post

    Hi Trent Mosher,

    The RadCalendar base stylesheet contains the following CSS rule:

    .RadCalendar  .rcWeek  th
    {
        text-align:right;
    }

    You can easily override the above style by using a CSS rule with a higher specificity:

    http://blogs.telerik.com/dimodimov/posts/08-06-17/how_to_override_styles_in_a_radcontrol_for_asp_net_ajax_embedded_skin.aspx

    (Note that .RadCalendar is a CSS class applied to a <table>, not a <div>)

    All the best,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Trent
    Trent avatar
    11 posts
    Member since:
    Apr 2010

    Posted 21 May 2010 Link to this post

    Nice.  Thank you very much. 

    One other note.  The calendar is in a table as you noted but the datepicker is in a div.  Not realizing this, I inserted table in front of the datepicker classes and the little calendar icon disappeared.  I changed it to div and it works perfectly now. 

    Thanks again.
Back to Top