我在我的项目中使用以下代码作为范围日期
var datepickerDefaults = {
showTodayButton: true,
showClear: true
};
yadcf.init($Table, [{
column_number: 0,
filter_type: "range_date",
datepicker_type: 'bootstrap-datetimepicker',
date_format: 'DD/MM/YYYY',
filter_plugin_options: datepickerDefaults,
filter_container_id: "FilterContainer_Date",
} ],
{
cumulative_filtering: true
}
);
我想将日期范围过滤器从和更改为输入占位符文本,我想为从和<分配默认值strong> to 输入。
答案 0 :(得分:2)
行。我找到了解决方案如下;
yadcf.init($Table, [{
column_number: 0,
filter_type: "range_date",
datepicker_type: 'bootstrap-datetimepicker',
date_format: 'DD/MM/YYYY',
filter_plugin_options: datepickerDefaults,
filter_container_id: "FilterContainer_Date",
filter_default_label: ["From Date", "End Date"]
}],
{
cumulative_filtering: true
}
);
yadcf.exFilterColumn($Table, [
[0, {
from: '01/12/2017',
to: '31/01/2018'
}],
]);