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

How do you modify the template of the day names?

4 Answers 65 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Arash Emami
Top achievements
Rank 1
Arash Emami asked on 06 Apr 2010, 08:17 PM
Hi, I would like to modify how the day names (i.e. Sunday, Monday, Tuesday, etc.) are displayed.  How would I go about doing that?  Thank you

4 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 09 Apr 2010, 01:12 PM
Hello Arash,

Thank you for your question.

You can modify the names of the weeks by setting the Culture of the Calendar:

calendar.Culture = new System.Globalization.CultureInfo("en-US")
{
    DateTimeFormat = new System.Globalization.DateTimeFormatInfo()
    {
        AbbreviatedDayNames = new string[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" },
    }
}

If you have further questions please let us know.

All the best,
Konstantina
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.
0
Arash Emami
Top achievements
Rank 1
answered on 10 Apr 2010, 01:40 AM
Hi, I want to modify the template of the day names only.

It looks to me like both the day names and the numerical days are controlled by the same template - DayTemplate.

I need to have a different template for the day headers (i.e. Sun, Mon, etc.).  They need to look different from how the actual days look.

Can you please upload a hotfix that includes a 2nd template that controls just the day names?  Or, if there is an easier way to do it, let me know please.  It is needed for a project and we should have customer support available to us.  Thank you,

Arash Emami
Fox Home Entertainment
0
Konstantina
Telerik team
answered on 15 Apr 2010, 09:07 AM
Hi Arash,

Sorry for the misunderstanding.

Attached I am sending you a sample project in which that is illustrated. It is achieved using DayTemplateSelector. You can find an example of its use in our online demos.

If you need further assistance please let us know.

Kind regards,
Konstantina
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.
0
Arash Emami
Top achievements
Rank 1
answered on 15 Apr 2010, 10:20 PM
Thank you Konstantina, that works well!
Tags
Calendar
Asked by
Arash Emami
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Arash Emami
Top achievements
Rank 1
Share this question
or