Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasJang committed Jul 8, 2016
1 parent df7f70b commit 0b46eec
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
21 changes: 11 additions & 10 deletions dist/ax5calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,14 +605,12 @@
}.bind(this));
},
clearPeriodMap = function clearPeriodMap() {
setTimeout(function () {
if (cfg.mode === "day" || cfg.mode === "d") {
for (var k in this.periodMap) {
this.$["body"].find('[data-calendar-item-date="' + k + '"]').find(".addon-footer").empty();
this.$["body"].find('[data-calendar-item-date="' + k + '"]').removeClass(this.periodMap[k].theme);
}
if (cfg.mode === "day" || cfg.mode === "d") {
for (var k in this.periodMap) {
this.$["body"].find('[data-calendar-item-date="' + k + '"]').find(".addon-footer").empty();
this.$["body"].find('[data-calendar-item-date="' + k + '"]').removeClass(this.periodMap[k].theme);
}
}.bind(this));
}
};

/**
Expand Down Expand Up @@ -912,8 +910,7 @@

v.range.forEach(function (n) {
if (U.isDateFormat(n.from) && U.isDateFormat(n.to)) {

for (var d = U.date(n.from); d <= U.date(n.to); d.setDate(d.getDate() + 1)) {
for (var d = new Date(U.date(n.from)); d <= U.date(n.to); d.setDate(d.getDate() + 1)) {
if (d.getTime() == U.date(n.from).getTime()) {
map[U.date(d, { "return": cfg.dateFormat })] = { theme: n.theme || cfg.defaultPeriodTheme, label: n.fromLabel };
} else if (d.getTime() == U.date(n.to).getTime()) {
Expand All @@ -935,6 +932,11 @@
var key,
result = {};

// 변경내용 적용하여 출력
if (isApply !== false) {
clearPeriodMap.call(this);
}

if (cfg.period = period) {
result = processor.range(period);
}
Expand All @@ -945,7 +947,6 @@

// 변경내용 적용하여 출력
if (isApply !== false) {
clearPeriodMap.call(this);
applyPeriodMap.call(this);
}
return this;
Expand Down
Loading

0 comments on commit 0b46eec

Please sign in to comment.