make sure TimeGrid's cell datetimes are in the calendar's timezone

This commit is contained in:
Adam Shaw
2014-08-19 17:24:23 -07:00
parent 1032e7303a
commit 33d733e364
+6 -3
View File
@@ -198,9 +198,12 @@ $.extend(TimeGrid.prototype, {
// Gets the datetime for the given slot cell
getCellDate: function(cell) {
// the View's cellToDate system only accounts for the beginning of whole days
return this.view.cellToDate(0, cell.col).time(
this.minTime + this.snapDuration * cell.row
var view = this.view;
var calendar = view.calendar;
return calendar.rezoneDate( // since we are adding a time, it needs to be in the calendar's timezone
view.cellToDate(0, cell.col) // View's coord system only accounts for start-of-day for column
.time(this.minTime + this.snapDuration * cell.row)
);
},