javascript - Moment.js and ion rangeSlider: Date not formatted -
i'm using ion slider (http://ionden.com/a/plugins/ion.rangeslider/en.html) , moment.js handle dates. problem date not formatted way should on slider.
var beginmoment = moment("2015-04-20"); var endmoment = moment("2015-08-20"); console.log("begin"); console.log(beginmoment); $("#chord_range").ionrangeslider({ type: "double", min: +moment(beginmoment).format("x"), max: +moment(endmoment).format("x"), from: +moment(beginmoment).format("x"), to: +moment(endmoment).format("x"), prettify: function (num) { return moment(num, "x").format("dddd, mmm yyyy"); }});
the log give correct format however. suggestions appreciated.
Comments
Post a Comment