diff options
author | John Rayes <live627@gmail.com> | 2015-08-25 23:12:32 -0700 |
---|---|---|
committer | John Rayes <live627@gmail.com> | 2015-08-25 23:12:32 -0700 |
commit | 252a73a00c20a5a1fe5eeae012e24947344388bc (patch) | |
tree | bd998d3d00b38dacbf6c498bc2abbfca1eebe373 | |
parent | 87ca8a8d49293a6510de512dbc724fb4b381a152 (diff) | |
parent | de31c6ea22ed5b77178f6ac5d3a6d7f3289b6f71 (diff) | |
download | jquery-week-calendar-252a73a00c20a5a1fe5eeae012e24947344388bc.zip jquery-week-calendar-252a73a00c20a5a1fe5eeae012e24947344388bc.tar.gz jquery-week-calendar-252a73a00c20a5a1fe5eeae012e24947344388bc.tar.bz2 |
Merge pull request #4 from bksunday/patch-1
account for EST/EDT in _updateDayColumnHeader
-rw-r--r-- | jquery.weekcalendar.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jquery.weekcalendar.js b/jquery.weekcalendar.js index cfa6f48..794113b 100644 --- a/jquery.weekcalendar.js +++ b/jquery.weekcalendar.js @@ -1322,6 +1322,14 @@ $weekDayColumns.each(function(i, val) { $(this).data('startDate', self._cloneDate(currentDay)); + + var endDate = self._cloneDate(currentDay); + endDate.setTime(currentDay.getTime() + MILLIS_IN_DAY); + + if(endDate.getTimezoneOffset() != currentDay.getTimezoneOffset()) { + endDate.setTime(endDate.getTime()+(endDate.getTimezoneOffset()-currentDay.getTimezoneOffset())*60000); + } + $(this).data('endDate', new Date(currentDay.getTime() + (MILLIS_IN_DAY))); if (self._isToday(currentDay)) { $(this).parent() |