在bootstrap datepicker中更改箭头时出现问题

时间:2017-12-08 12:06:03

标签: jquery html twitter-bootstrap-3

我在我的示例项目中使用bootstrap3-datetimepicker(版本〜> 4.17.47),我的要求是制作datepicker。我添加了下面提到的代码。

$('#drop-off-datepicker').datepicker({
      setDate: new Date($('#drop-off-datepicker').attr('value')),
      templates: {
            leftArrow: '«',
            rightArrow: '»'
      }
});

但是,日期选择器以this方式显示。如果我在这种模式下更改代码,则datepicker将完美运行。

$('#drop-off-datepicker').datepicker('setDate', new Date($('#drop-off-datepicker').attr('value')));

我不知道在第一组代码中我做错了什么,我参考了这个link。任何帮助表示赞赏。

0 个答案:

没有答案