M
M
Michael2019-09-13 15:37:16
Yii
Michael, 2019-09-13 15:37:16

How to prevent selection of past dates in DatePicker?

Hello everybody! I use a widget from kartik DatePicker, tell me if it is possible to configure it so that past dates are blocked. I tried to use the following script, but it does not help:

$("#calendar").datepicker({
    minDate:0
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2019-09-13
@Bally

Add
startDate: date in your format like 2019-09-13
'startDate'=> date('d-m-Y H:i',time()),

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question