Skip to content

Commit

Permalink
IE11: fixing highlightWeek function
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav_shylo committed Jul 17, 2017
1 parent 652cdce commit 33f68c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/node_modules/
*.sublime-project
*.sublime-workspace
.idea/index.html
.idea
index.html
coverage
.tern-port
5 changes: 4 additions & 1 deletion dist/plugins/weekSelect/weekSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ function weekSelectPlugin(pluginConfig) {
var days = fp.days.childNodes;
for (var i = days.length; i--;) {
var date = days[i].dateObj;
if (date >= fp.weekStartDay && date <= fp.weekEndDay) days[i].classList.add("week", "selected");
if (date >= fp.weekStartDay && date <= fp.weekEndDay) {
days[i].classList.add("week");
days[i].classList.add("selected");
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/plugins/weekSelect/weekSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ function weekSelectPlugin(pluginConfig) {
const days = fp.days.childNodes;
for(let i = days.length; i--;) {
const date = days[i].dateObj;
if (date >= fp.weekStartDay && date <= fp.weekEndDay)
days[i].classList.add("week", "selected");
if (date >= fp.weekStartDay && date <= fp.weekEndDay) {
days[i].classList.add("week");
days[i].classList.add("selected");
}
}
}

Expand Down

0 comments on commit 33f68c4

Please sign in to comment.