Closed Espesen closed 11 years ago
I've made a Pull Request that fixes this problem: https://github.com/ChiperSoft/Kalendae/pull/85
Commit: https://github.com/hazanjon/Kalendae/commit/ed296d0d6d7485e76da5a1a3ea0ca4082b8d9b33
Solved in commit eecd2f1
PS: do not use a string for the date, use a moment object:
var newDate = Kalendae.moment('2013-02-21');
kal.setSelected(newDate);
kal.viewStartDate = newDate;
kal.draw();
After instantiating a new Kalendae object like this:
var kal = new Kalendae('calendar', {} );
calendar's arrow navigation keys work as excepted. But if I later do this:
var newDate = '2013-02-21'; kal.setSelected(newDate); kal.viewStartDate = newDate; kal.draw();
the selected date and calendar view moves to desired date but the arrow keys no longer work. In JS console, I get an error message "Object 2013-02-21 has no method 'add'". I tried different string formatting and even Date and moment objects as a value of newDate but with no luck.