bootstrap-datepicker icon indicating copy to clipboard operation
bootstrap-datepicker copied to clipboard

Disabled dates can be selected using keyboard

Open vchandransuja-athene opened this issue 3 years ago • 0 comments

Expected behaviour

It should not select a disabled date(disabled using the beforeShowDay option https://bootstrap-datepicker.readthedocs.io/en/stable/options.html#beforeshowday) even when we navigate and select using keyboard.

Actual behaviour

Even when a date is set to be disabled using beforeShowDay option, the date can still be selected using the keyboard(using arrow keys + enter key), however, it's not selectable using the mouse(which is expected). And using options such as daysOfWeekDisabled and datesDisabled to disable dates works fine, however trying to use beforeShowDay to disable dates doesnt work.

Datepicker version used

ex. v1.9.0

Example code

https://jsbin.com/jisotevoni/edit?html,js,console,output this jsbin reproduces the issue

I did a search on the same issue and I was able to find similar old issue https://github.com/uxsolutions/bootstrap-datepicker/issues/1365 and according to those issue it was fixed a long time back but I can still reproduce the same issue in 1.9.0. Or is it that I am doing something wrong?

Any help is appreciated, thanks in advance

vchandransuja-athene avatar Jun 14 '22 16:06 vchandransuja-athene