Custom format for calendar title

2 posts, 1 answers
  1. Alex
    Alex avatar
    25 posts
    Member since:
    Mar 2011

    Posted 08 Apr 2013 Link to this post

    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!
        
  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 09 Apr 2013 Link to this post

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