Print Page | Close Window

How to change the Header-Date-Format in MonthView?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=13159
Printed Date: 07 October 2024 at 1:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to change the Header-Date-Format in MonthView?
Posted By: Jebo
Subject: How to change the Header-Date-Format in MonthView?
Date Posted: 13 January 2009 at 8:23am
Hi, I want to change the Header-Date-Format in MonthView to "dd MMM" (see screenshot at 22 Feb). But how can I do that?

I was trying:

With cal.MonthView
    .DayHeaderFormatShort = "dd MMM"
    .DayHeaderFormatMiddle = "dd MMM"
    .DayHeaderFormatLong = "dd MMM"
    .DayHeaderFormatShortest = "dd MMM"
End With

...but absolutly NOTHING will be changed. What do I wrong please?





Replies:
Posted By: mdoubson
Date Posted: 13 January 2009 at 12:26pm

Try this

With CalendarControl.MonthView
    .DayHeaderFormatShort = "MMM dd "
    .DayHeaderFormatMiddle = "MMM dd"
    .DayHeaderFormatLong = "MMM dd "
    .DayHeaderFormatShortest = "MMM dd"
End With

and Select Non Office2007 theme


Posted By: Jebo
Date Posted: 13 January 2009 at 12:29pm
Thx, but argh... ...I want it in Office07-Theme!

Is there no way to format the headers in Office07-Theme? ;-(


Posted By: mdoubson
Date Posted: 13 January 2009 at 1:06pm
In Office2007 theme settings take from locale - not from the user

CString strMonth = CXTPCalendarUtils::GetLocaleString(LOCALE_SABBREVMONTHNAME1 + nMonth - 1, 100);

//LOCALE_IDATE - short date format ordering

// 0 Month-Day-Year

// 1 Day-Month-Year

// 2 Year-Month-Day

int nDateOrdering = CXTPCalendarUtils::GetLocaleLong(LOCALE_IDATE);

if (nDateOrdering == 1)

strTextLeft.Format(_T("%d %s"), nDay, (LPCTSTR)strMonth);

else

strTextLeft.Format(_T("%s %d"), (LPCTSTR)strMonth, nDay);
 


Posted By: mdoubson
Date Posted: 13 January 2009 at 6:01pm
Well - I did it but this is different setting to change as it related to another mode.
In VB you need to call smth like
    CalendarControl.SetLongDayHeaderFormat ("MMMM d")
and same time use your old code - related to Non-Office2007 mode
    With CalendarControl.MonthView
    .DayHeaderFormatShort = "d"
    .DayHeaderFormatMiddle = "MMM d"
    .DayHeaderFormatLong = "MMMM d"
    .DayHeaderFormatShortest = "d"
    End With
BE IN Release 13 SOON


Posted By: mdoubson
Date Posted: 14 January 2009 at 4:09pm
because this is different properties and user can have different formats for different themes



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net