Re-initialize or destroy Bootstrap datepicker dynamically

前端 未结 5 1929
别跟我提以往
别跟我提以往 2021-02-05 06:19

Is there a way to destroy the Bootstrap datepicker dynamically updating its options like format, beforeShowDay, etc.? I know that the jQuery UI datepicker has a destroy method b

5条回答
  •  心在旅途
    2021-02-05 07:12

    Propably you are using datepicker with input btn group, I mean you with a date icon button. So, you should not choose just input element when you want to destroy it and reinit. You should select div has "date-picker", then remove and init again.

提交回复
热议问题