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

Changing the RadDatePicker Calendar Popup Icon

7 Answers 476 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
ATS
Top achievements
Rank 1
ATS asked on 02 Jul 2008, 09:49 PM
I like to use the Web20 skin for the popup calendar itself in a RadDatePicker, but I prefer the calendar popup icons from the other skins. I know I can change the icon with the DatePopupButton-ImageUrl property, but I don't know how to reference the icons that are now embedded. Of course with the old ASP.NET controls, I had a folder and a file to point at. How do I access that resource now?

Thanks!

7 Answers, 1 is accepted

Sort by
0
ATS
Top achievements
Rank 1
answered on 02 Jul 2008, 09:55 PM
I found this in my code where I set the RadAjaxPanel image to one of the embedded images. I'm hoping there's a similar method to change the RadDatePicker's calendar icon.

RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") 

0
Sebastian
Telerik team
answered on 03 Jul 2008, 08:32 AM
Hi Justin,

In order to replace the default images for the date-picker pop-up, you will need to disable the internal skin (by setting EnableEmbeddedSkins to false) and use an external one of design a custom skin taking the css definitions/images of the built-in skin as a basis.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sebastian
Telerik team
answered on 03 Jul 2008, 08:33 AM
Hi Justin,

In order to replace the default images for the date-picker pop-up, you will need to disable the internal skin (by setting EnableEmbeddedSkins to false) and use an external one of design a custom skin taking the css definitions/images of the built-in skin as a basis.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ATS
Top achievements
Rank 1
answered on 03 Jul 2008, 02:38 PM
Are there any plans to expose a method like RadAjaxLoadingPanel's GetWebResourceUrl()? That seems like a pretty elegant way to go about it. I mean, I could just set the skin to the calendar icon I like, right click and copy the WebResource.axd URL and set that as the ImageURL, right? But that's hardly ideal.
0
ATS
Top achievements
Rank 1
answered on 03 Jul 2008, 06:18 PM
What is Telerik.Web.SkinManager? That class looks like it would have all the methods I'd need for getting the web resource URL for a calendar icon from one of the skins, but it doesn't appear to be exposed?
0
Missing User
answered on 07 Jul 2008, 03:18 PM
Hi Justin,

You can use GetWebResourceUrl - the GetWebResourceUrl method returns a URL reference to a resource embedded in an assembly. The returned reference is not URL encoded. Resources can be script files, images, or any static file. You specify the type based on the object that will be accessing the resource.

A Web resource registered with the page is uniquely identified by its type and name. Only one resource with a given type and name pair can be registered with the page. Attempting to register a resource that is already registered does not create a duplicate of the registered resource.

Here is an example:

<%@ Page Language="C#" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Untitled Page</title> 
    <script runat="server"
    protected void Page_Load(object sender, EventArgs e) 
    { 
        Image1.ImageUrl = Page.ClientScript.GetWebResourceUrl(typeof(RadCalendar), "Telerik.Web.UI.Skins.Hay.Calendar.datePickerPopup.gif"); 
    }     
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
            <asp:Image ID="Image1" runat="server" /> 
        </div> 
    </form> 
</body> 
</html> 
 



For more information on using resources in applications, see ASP.NET Web Page Resources Overview.


Best wishes,
Plamen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bevan
Top achievements
Rank 1
answered on 06 Oct 2011, 07:21 PM
I just read this post from Telerik which solved the problem:

By default the icons for the datepicker popup are taken from the embedded skin in the RadCalendar assembly. If you want to change them you can use the ImageUrl and HoverImageUrl properties like this:

 <radCln:RadDatePicker ID="RadDatePicker1" runat="server">
        <Calendar Skin="Default"></Calendar>
        <DatePopupButton ImageUrl="~/RadControls/Calendar/Skins/Default/Img/datePickerPopupHover.gif" HoverImageUrl="~/RadControls/Calendar/Skins/Default/Img/datePickerPopupHover.gif" />
        </radCln:RadDatePicker>


Let us know if we can be of further help.

Kind regards,
Steve
the Telerik team

Tags
Calendar
Asked by
ATS
Top achievements
Rank 1
Answers by
ATS
Top achievements
Rank 1
Sebastian
Telerik team
Missing User
Bevan
Top achievements
Rank 1
Share this question
or