Bootstrap datepicker disabling past dates without current date

前端 未结 20 2237
[愿得一人]
[愿得一人] 2020-11-27 04:55

I wanted to disable all past date before current date, not with current date. I am trying by bootstrap datepicker library \"bootstrap-datepicker\" and using following code:<

20条回答
  •  生来不讨喜
    2020-11-27 05:24

    You can find your solution in this link below: https://codepen.io/ahmetcadirci25/pen/NpMNzJ

    Thats work for me.

    My code:

            var date = new Date();
            date.setDate(date.getDate());
    
            $('#datetimepicker1').datetimepicker({
                isRTL: false,
                format: 'dd.mm.yyyy hh:ii',
                autoclose: true,
                language: 'tr',
                startDate: date
            });
    

提交回复
热议问题