在选择日期到日期日历后,我不确定是什么导致它被触发三次.这是为其设置的选项rangeSelector
rangeSelector:{
enabled:true,
inputEnabled: true,
inputDateFormat: '%d/%m/%Y',
inputEditDateFormat: '%d/%m/%Y',
inputDateParser: function (value) {
value = value.split('/');
console.log(value);
return Date.UTC(
parseInt(value[0]),
parseInt(value[1]) - 1,
parseInt(value[2])
);
}
}
Run Code Online (Sandbox Code Playgroud)
通过使用backbone.viewjquery选择器,这里我如何启动图表
this.$el.highcharts(Options, this.extra);
以及extra作为触发日期选择器的其他设置
highlightSer: function (chart){
setTimeout(function () {
$('input.highcharts-range-selector', $(chart.container).parent())
.datepicker({
format: "dd/mm/yyyy",
todayBtn: "linked",
autoclose: true,
todayHighlight: true,
orientation: "auto right"
});
}, 0);
}
Run Code Online (Sandbox Code Playgroud)
有人经历过吗?