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

ViewDefinitions CurrentCulture with 24h

2 Answers 43 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 17 Jul 2012, 10:39 PM
Hi,

I use the RadScheduleView from RadControls for WPF Q2 2012
If I do not define a TimerulerMajorTickStringFormat for a ViewDefinition I whould expect that the ShortTime Format of the  CurrentCulture is used to generate the time label. But If I use a current culture with a 24h display like german it only shows 12h.

See attachment.

It looks like a bug to me since it makes not much sense to show only 12h but no AM/PM like you can see on my screenshot.

To work around this I have Bind the StringFormat to a property that returns this:
Return "{0:" + CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern + "}"

best regards,
David

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 18 Jul 2012, 09:12 AM
I have improved it a bit by just writing TimerulerMajorTickStringFormat="{}{0:t}"
0
Vladi
Telerik team
answered on 19 Jul 2012, 01:13 PM
Hello David,

RadScheduleView sets its culture corresponding to the current culture but in cases like this the appropriate way to set the culture is by using the TimerulerMajorTickStringFormat property. Setting the TimeRuler culture to 24 h is considered a breaking change and it is not in consideration.

We apologize for any inconvenience that this may cause you.

Greetings,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Vladi
Telerik team
Share this question
or