History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: COO-142
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Daniel Murley
Reporter: Kévin Ferrare
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Cooee

CalendarSelect's day names are incorrect

Created: 20/Dec/07 07:40 PM   Updated: 10/Nov/08 01:13 PM
Component/s: [Component] Calendar Select
Affects Version/s: COOEE-CORE-1.0, COOEE-CORE-1.0.1, COOEE-CORE-1.0.2, COOEE-CORE-1.1
Fix Version/s: COOEE-CORE-1.2


 Description  « Hide
The day names are shifted and doesn't correspond to the dates displayed below.
For example instead of starting on sunday, the day names list starts on monday

A quick fix I made :
Index: src/main/java/org/karora/cooee/webcontainer/syncpeer/CalendarSelectPeer.java
===================================================================
— src/main/java/org/karora/cooee/webcontainer/syncpeer/CalendarSelectPeer.java (rĂ©vision 899)
+++ src/main/java/org/karora/cooee/webcontainer/syncpeer/CalendarSelectPeer.java (copie de travail)
@@ -278,12 +278,11 @@
Locale locale = calendarSelect.getRenderLocale();
Calendar cal = Calendar.getInstance(locale);

  • initElement.setAttribute("first-day", String.valueOf(cal.getFirstDayOfWeek()));
    + initElement.setAttribute("first-day", String.valueOf(0));

Element dayNamesElement = document.createElement("day-names");



 All   Comments   Change History      Sort Order:
Will Gilbert - [07/Sep/08 10:08 AM ]
The correct fix to this issue involve the JavaScript file:

src/main/resources/org/karora/cooee/webcontainer/resource/js/CalendarSelect.jsCalendarSelect.js

Line 178 Should be:

var dayOfWeekName = this.dayOfWeekNames[((this.firstDayOfWeek - 1) + j) % 7];

The 'firstDayOfWeek' is one-based and not zero-based as assumed and probably never tested.


Pete Butland - [10/Nov/08 01:13 PM ]
Fixed by Will Gilbert