Datepicker as cell editor in datatable

I’m trying to implement an editable datepicker as a cell editor in a datatable, to allow a user to either select a date from the calendar, or manually enter a date. The standard date editor only supports date selection, but not manual date entry.

Please see snippet https://snippet.webix.com/tdnxyvbm

With this code sample, the navigation of the datepicker (e.g. clicking on arrow left/right, clicking on year etc) doesn’t work. Because it is invoked as a popup, any click closes the datepicker and returns focus to the datatable.

Can you pls advise how to implement proper behaviour?

Hello,

Because it is invoked as a popup, any click closes the datepicker and returns focus to the datatable.

it’s normal behavior for popup editors. Any click outside the editor or its popup stops editing of the master component (saves editor value and closes the editor). That’s why the popup with a datepicker closes - the click target is outside it.

The standard date editor only supports date selection, but not manual date entry.
You can create a custom editor with the needed functionality.
Check the snippet, please https://snippet.webix.com/vmho3b9c. Though it’s rather an approximate solution, it may satisfy your needs.

hi Nastja, that snippet doesn’t work, it doesn’t show the calendar, it is just a text entry?

@johsmith Code Snippet
The icon was an old one

Brilliant, that works nicely. Thank you

One more question, please. This works great in a datatable, but if I apply this to the spreadsheet widget (as a cell editor), the editor doesn’t fire.

Here is a snippet with the code: https://snippet.webix.com/siym1liy

Can you please advise?

Hello @johsmith ,

Please check this: https://snippet.webix.com/bp3trhmb

Also, is possible to remove icon after clicking on the cell:
https://snippet.webix.com/o4ol6t8b

Thank you Nastja, what a quick response. That works. Great support!