We need to compare against the month of the current view, not of today.
authorJan Schneider <jan@horde.org>
Mon, 9 Nov 2009 16:23:22 +0000 (17:23 +0100)
committerJan Schneider <jan@horde.org>
Mon, 9 Nov 2009 16:23:22 +0000 (17:23 +0100)
kronolith/js/kronolith.js

index 052ed1b..127e3a8 100644 (file)
@@ -2061,18 +2061,17 @@ KronolithCore = {
                 return;
 
             case 'kronolithMinical':
-                var today = new Date();
                 if (orig.id == 'kronolithMinicalPrev') {
                     var date = this.parseDate($('kronolithMinicalDate').retrieve('date'));
                     date.previous().month();
-                    this.updateMinical(date, date.getMonth() == today.getMonth() ? this.view : undefined);
+                    this.updateMinical(date, date.getMonth() == this.date.getMonth() ? this.view : undefined);
                     e.stop();
                     return;
                 }
                 if (orig.id == 'kronolithMinicalNext') {
                     var date = this.parseDate($('kronolithMinicalDate').retrieve('date'));
                     date.next().month();
-                    this.updateMinical(date, date.getMonth() == today.getMonth() ? this.view : null);
+                    this.updateMinical(date, date.getMonth() == this.date.getMonth() ? this.view : null);
                     e.stop();
                     return;
                 }