Clear the value of bootstrap-datepicker

前端 未结 10 1883
甜味超标
甜味超标 2020-12-28 12:56

I am using bootstrap-datepicker from here: https://github.com/eternicode/bootstrap-datepicker

version: 2.3.2

I am having trouble to clear the date values of

10条回答
  •  灰色年华
    2020-12-28 13:49

    You can use jQuery to clear the value of your date input.

    For exemple with a button and a text input like this :

    
    
    

    You can use the .val() function of jQuery.

    $("#reset-date").click(function(){
        $('#datepicker').val("").datepicker("update");
    })
    

提交回复
热议问题