Is it possible to use HTML5 Data Attributes to initialize the Bootstrap 3 Datepicker?

前端 未结 1 1268
半阙折子戏
半阙折子戏 2020-12-21 08:05

At the the moment, we\'re using the datetimepicker in a semi-modular way because the initialization is done in javascript. Formerly we were using a different datepicker comp

1条回答
  •  遥遥无期
    2020-12-21 08:59

    You can init datepicker options using data attributes, as you can see in the following example:

    $('#datetimepicker1').datetimepicker();
    
    
    
    
    
    
    
    
    

    You can use data-date-* to set an option or data-date-options setting an option object. The data-* initialization, in my opinion, it's poorly documented, anyway you can find some reference to it here.

    0 讨论(0)
提交回复
热议问题