Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Fix broken calendar JS
Browse files Browse the repository at this point in the history
Resolves #1218
- use dateInTimeZone instead of new Date for consistency
  • Loading branch information
orenyk committed Apr 22, 2015
1 parent 4db1ada commit b312f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ function renderCalendar(reservations, week_start, max, blackouts) {
week_end.setDate(week_start.getDate() + 6);

for(var d = 0; d < reservations.length; d++) {
var end = new Date (reservations[d].end);
var start = new Date (reservations[d].start);
var end = dateInTimeZone(reservations[d].end);
var start = dateInTimeZone(reservations[d].start);
if ((start < week_end) && (end >= week_start)) {
//for each reservation, decrement availability per day
var begin_date = ((week_start > start) ? week_start : start);
Expand Down

0 comments on commit b312f31

Please sign in to comment.