Marc358 / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
0 stars 0 forks source link

Incorrect indent for noon while AM/PM is disabled #150

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create calendar widget with 24hr format (without AM/PM)
2. Open day view widget in IE

What is the expected output? What do you see instead?
Hours should be equally layed out. There is indent around 12:00.

What version of the product are you using? On what operating system?
0.9.2 / various systems

Please provide any additional information below.
It's caused by code in DayViewTimeline:
{{
            String amPm = " ";
            if(i<13)
                amPm += CalendarFormat.INSTANCE.getAm();
            else if(i>13)
                amPm += CalendarFormat.INSTANCE.getPm();
            else {
                hour = CalendarFormat.INSTANCE.getNoon();
                amPm = "";
            }
}}
For 12. hour default " " (space) text is replaced by "" (empty string). It 
should be also replaced to " " (space).

Original issue reported on code.google.com by jakub.gr...@gmail.com on 7 Mar 2012 at 12:54

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Jakub,

In r401 I introduced a change that should help you with this issue.

If your locale is using 12:00 as the Noon Label, then should work. But can also 
simply  do something like: CalendarFormat.INSTANCE.setUseNoonLabel(false);

That will have the same effect, but without needing to modify the locale.

Can you check that is solving your problem?

Original comment by ctasada on 18 Apr 2012 at 8:29

GoogleCodeExporter commented 8 years ago

Original comment by ctasada on 24 Apr 2012 at 9:59

GoogleCodeExporter commented 8 years ago

Original comment by ctasada on 23 Jan 2013 at 11:21