Use dateString() as parameter for ListEvents.
authorJan Schneider <jan@horde.org>
Fri, 27 Feb 2009 12:06:38 +0000 (13:06 +0100)
committerJan Schneider <jan@horde.org>
Mon, 2 Mar 2009 10:52:49 +0000 (11:52 +0100)
Fix end date of month' ListEvents call.

kronolith/js/src/kronolith.js

index 02290f7..cee2fd7 100644 (file)
@@ -356,7 +356,7 @@ KronolithCore = {
             day.moveToBeginOfWeek();
             firstDay = day.clone()
             monthEnd.moveToLastDayOfMonth();
-            monthEnd.moveToBeginOfWeek();
+            monthEnd.moveToEndOfWeek();
 
             // Remove old rows. Maybe we should only rebuild the calendars if
             // necessary.
@@ -472,7 +472,7 @@ KronolithCore = {
     _loadEvents: function(firstDay, lastDay, callback, calendar)
     {
         this.eventsLoading = firstDay.dateString() + lastDay.dateString();
-        this.doAction('ListEvents', { start: firstDay.toJSON(), end: lastDay.toJSON() }, callback);
+        this.doAction('ListEvents', { start: firstDay.dateString(), end: lastDay.dateString() }, callback);
     },
 
     /**