Skip to content

Commit

Permalink
remove second call of onRenderCell callback, fixes t1m0n#96
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0n committed Aug 16, 2016
1 parent a71611b commit d38e515
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
7 changes: 1 addition & 6 deletions dist/js/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1515,12 +1515,6 @@
render = {},
html = d.date;

if (opts.onRenderCell) {
render = opts.onRenderCell(date, type) || {};
html = render.html ? render.html : html;
classes += render.classes ? ' ' + render.classes : '';
}

switch (type) {
case 'day':
if (parent.isWeekend(d.day)) classes += " -weekend-";
Expand Down Expand Up @@ -1553,6 +1547,7 @@
html = render.html ? render.html : html;
classes += render.classes ? ' ' + render.classes : '';
}

if (opts.range) {
if (dp.isSame(minRange, date, type)) classes += ' -range-from-';
if (dp.isSame(maxRange, date, type)) classes += ' -range-to-';
Expand Down
Loading

0 comments on commit d38e515

Please sign in to comment.