//reset slider functionality code in d3 js
// here we adding event for our resetButton on “click” event it should reset slider to initial value or date or year
resetButton.on(“click”, function () {
if (clearInterval(timer)) {
playButton.text(“Play”);
document.getElementsByClassName(“slider”).value = curDate.setDate(startDate);
} else if (timer = setInterval(step, 500)) {
playButton.text(“Pause”);
document.getElementsByClassName(“slider”).value = curDate.setDate(startDate);
} else {
document.getElementsByClassName(“slider”).value = curDate.setDate(startDate);
}
});