CC-3068: Day/Week view and Month view under Calendar page have different ideas about what day is today
-fixed "today" button behaving incorrectly.
This commit is contained in:
parent
ddd430be84
commit
864e697cc0
1 changed files with 5 additions and 2 deletions
|
@ -399,7 +399,9 @@ function Calendar(element, options, eventSources) {
|
||||||
elementOuterWidth = element.outerWidth();
|
elementOuterWidth = element.outerWidth();
|
||||||
|
|
||||||
header.updateTitle(currentView.title);
|
header.updateTitle(currentView.title);
|
||||||
var today = new Date();
|
//adjusting this date ensures that the "today" button is greyed out on the
|
||||||
|
//correct day.
|
||||||
|
var today = adjustDateToServerDate(new Date(), options["serverTimezoneOffset"]);
|
||||||
if (today >= currentView.start && today < currentView.end) {
|
if (today >= currentView.start && today < currentView.end) {
|
||||||
header.disableButton('today');
|
header.disableButton('today');
|
||||||
}else{
|
}else{
|
||||||
|
@ -581,7 +583,8 @@ function Calendar(element, options, eventSources) {
|
||||||
|
|
||||||
|
|
||||||
function today() {
|
function today() {
|
||||||
date = new Date();
|
//adjusting this date ensures that clicking "today" takes us to the correct date.
|
||||||
|
date = adjustDateToServerDate(new Date(), options["serverTimezoneOffset"]);
|
||||||
renderView();
|
renderView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue