Skip to content

Commit

Permalink
Slider
Browse files Browse the repository at this point in the history
  • Loading branch information
joh13010 committed Jan 9, 2017
1 parent 89c4835 commit 54a5c83
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Slider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function addSlider(fileData) {
var minDate = new Date(fileData.data[0].local_time);
var maxDate = new Date(fileData.data[data.data.length - 1].local_time);

$("#slider").dateRangeSlider({

arrows: false,

bounds: {
min: minDate,
max: maxDate
},

defaultValues: {
min: minDate,
max: maxDate
}
});

document.getElementById("sliderHeading").innerHTML = "Specify a Date Range:";

// Will call an updateMarkers() function that adds/removes points depending on their date
$("#slider").bind("valuesChanged", function(e, data){
console.log("Values just changed. min: " + data.values.min + " max: " + data.values.max);
});
}

0 comments on commit 54a5c83

Please sign in to comment.