summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Rayes <live627@gmail.com>2015-08-25 23:12:32 -0700
committerJohn Rayes <live627@gmail.com>2015-08-25 23:12:32 -0700
commit252a73a00c20a5a1fe5eeae012e24947344388bc (patch)
treebd998d3d00b38dacbf6c498bc2abbfca1eebe373
parent87ca8a8d49293a6510de512dbc724fb4b381a152 (diff)
parentde31c6ea22ed5b77178f6ac5d3a6d7f3289b6f71 (diff)
downloadjquery-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.js8
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()