Skip to content

Commit 4dc0acb

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent d0b0d2a commit 4dc0acb

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/kendo.calendar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ var __meta__ = { // jshint ignore:line
659659

660660
_dateInView: function(date) {
661661
var that = this,
662-
firstDateInView = toDateObject(that._cellsBySelector(CELLSELECTOR + ":first").find("a")),
663-
lastDateInView = toDateObject(that._cellsBySelector(CELLSELECTOR + ":last").find("a"));
662+
firstDateInView = toDateObject(that._cellsBySelector(CELLSELECTORVALID + ":first").find("a")),
663+
lastDateInView = toDateObject(that._cellsBySelector(CELLSELECTORVALID + ":last").find("a"));
664664

665665
return +date <= +lastDateInView && +date >= +firstDateInView;
666666
},

tests/calendar/navigation.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,5 +1015,21 @@
10151015
assert.equal(calendar.selectDates().length, 6);
10161016

10171017
});
1018+
1019+
it("navigating in century view works correctly", function() {
1020+
var calendar = div.kendoCalendar({
1021+
selectable: "multiple",
1022+
weekNumber: true,
1023+
start: "century",
1024+
disableDates: ["we", "sa"]
1025+
}).getKendoCalendar();
1026+
1027+
var rightEvent = { keyCode: kendo.keys.RIGHT, preventDefault: $.noop };
1028+
var current = calendar.current().getFullYear();
1029+
calendar.focus();
1030+
calendar._move(rightEvent);
1031+
assert.equal(calendar.current().getFullYear(), current + 10);
1032+
1033+
});
10181034
});
10191035
}());

0 commit comments

Comments
 (0)