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

Custom format for calendar title

1 Answer 54 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 08 Apr 2013, 03:18 PM
I need to show header of calendar like  (prev) MONTH (next).
Please, help me achieve following goals:
1. Month name in upper case
I know you write it in lower case because it's metro style, but can you introduce a property with DateTimeFormat you are using for month name?
Now it's hardcoded in the code 
>>   string newMonthText = dateTime.ToString("MMMM", this.GetCultureToUse()).ToLower(this.GetCultureToUse());

2. Navigate to next/previous months by tapping buttons
I see no methods or commands to show next/previous month in the calendar.

Thank you!
    

1 Answer, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 09 Apr 2013, 12:32 PM
Hello Alex,

Thank you for writing.

If you don't like the display mode of the calendar control, you can set the MonthInfoDisplayMode property to None. This will remove the month name from the calendar and if you still want to display it, you can add a custom TextBlock with its Text formatted as it suits your needs.

As to the navigation. There is a DisplayDate property which you can use to force navigation. You can use the following approach for navigation to previous month:
calendar.DisplayDate = calendar.DisplayDate.AddMonth(-1);

Let me know if you need additional assistance.

Greetings,
Todor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Calendar
Asked by
Alex
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or