Search code examples
bootstrap-datepicker

How disable handlers of Bootstrap Datepicker which delete value when "delete" key pressed?


From manual: https://eonasdan.github.io/bootstrap-datetimepicker/Options/#keybinds

'delete': function () { this.clear(); }

I try to disable handler:

keyBinds: {'delete': function() {} }

But it's don't effect. How make when "delete" key pressed, clear only one symbol from cursor?


Solution

  • Use null value instead of function.
    keyBinds: { 'delete':null }