Commit 49dda5ea authored by unknown's avatar unknown

Small date filter bug fix

parent 8618f774
......@@ -17,6 +17,16 @@ export class Graph2D {
this.showClearMenu = true;
}
toIso = (dateValue) => {
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
let [day, month, year] = dateValue.innerHTML.split(" ")
month = months.findIndex(x => x === month)
let date = new Date(year, month, day)
date.setFullYear(year)
return date
}
showGraph2D = () => {
const graphObj = this.graph2d.toGraphObj();
this.nodes = graphObj.elements.nodes;
......@@ -72,7 +82,7 @@ export class Graph2D {
layout.run();
this.filterByDate([document.getElementById('filter-date-start'), document.getElementById('filter-date-end')]);
this.filterByDate([document.getElementById('filter-date-start'), document.getElementById('filter-date-end')].map(this.toIso));
this.applyFilterToGraph();
this.cy.on('tapstart', (e) => { this.hideContextMenu(e); this.hideGraphMenu(e); });
......
module.exports = { version: '126' }
module.exports = { version: '183' }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment