1

イオン スライダー ( http://ionden.com/a/plugins/ion.rangeSlider/en.html ) と moment.js を使用して日付を処理しています。問題は、日付がスライダーで適切にフォーマットされないことです。

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 Do YYYY");
    }});

ただし、ログは正しい形式を提供します。どんな提案でも大歓迎です。

4

0 に答える 0