Skip to content

Commit

Permalink
fix: add proper conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alchez committed Feb 17, 2022
1 parent 282dade commit 2e31f5e
Show file tree
Hide file tree
Showing 10 changed files with 15,382 additions and 8,711 deletions.
6 changes: 3 additions & 3 deletions dist/frappe-charts.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3125,8 +3125,8 @@ class Heatmap extends BaseChart {

getDomainConfig(startDate, endDate='') {
let [month, year] = [startDate.getMonth(), startDate.getFullYear()];
let startOfWeek = toMidnightUTC(setDayToSunday(startDate)); // TODO: Monday as well
endDate = toMidnightUTC(clone(endDate) || getLastDateInMonth(month, year));
let startOfWeek = setDayToSunday(startDate); // TODO: Monday as well
endDate = endDate ? clone(endDate) : toMidnightUTC(getLastDateInMonth(month, year));

let domainConfig = {
index: month,
Expand Down Expand Up @@ -3159,7 +3159,7 @@ class Heatmap extends BaseChart {
let s = this.state;

// startDate is the start of week
let currentDate = clone(toMidnightUTC(startDate));
let currentDate = clone(startDate);
let col = [];

for(var i = 0; i < NO_OF_DAYS_IN_WEEK; i++, addDays(currentDate, 1)) {
Expand Down
2 changes: 1 addition & 1 deletion dist/frappe-charts.min.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/frappe-charts.min.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/frappe-charts.min.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/frappe-charts.min.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/js/frappe-charts.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/js/frappe-charts.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 2e31f5e

Please sign in to comment.