Search code examples
javascriptcsshtmldompikaday

Add text input to Pikaday modal dialog


I am trying to redesign Pikaday, and replace the year select to a text input. However, whenever I am adding an input there - it becomes disabled. If I inspect this element - it is not disabled, not z-indexed to background and not with opacity. Just not clicable. On hover, however, it does replace the cursor to text-edit cursor.

Does anyone know why it happens, and whether it is available to "fix" it?

Thanks!


Solution

  • OK, after analyzing the code better - I saw that all the modal dialog is listening to an event on mouse down - that "preventDefault"s it whenever the click is not on an expected target. The guilty method.

    So, in my case, just applying class 'pika-select' will make the form element to be interacted as expected.