Commit 63c1c30f51a7e14b36884b35a18255e361ee5a28
1 parent
511764a3
Exists in
master
and in
2 other branches
fixed weekly selector wrong chart when date was updated
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
dashboards/static/dashboards/js/behavior.js
... | ... | @@ -17,7 +17,9 @@ $(document).ready(function(){ |
17 | 17 | format: 'L', |
18 | 18 | defaultDate: new Date(), |
19 | 19 | }).on('dp.change', function(ev){ |
20 | - $.get('/analytics/get_days_of_the_week_log', {date: ev.date._i}).done(function(data){ | |
20 | + new_date = new Date(ev.date); | |
21 | + var date = (new_date.getMonth() + 1) + '/' + new_date.getDate() + '/' + new_date.getFullYear(); | |
22 | + $.get('/analytics/get_days_of_the_week_log', {date: date}).done(function(data){ | |
21 | 23 | charts.month_heatmap(data, '#bottom-right-chart-body', 'weekly-chart'); |
22 | 24 | }); |
23 | 25 | ... | ... |