Inline editor, keys and datepicker
Inline editor, keys and datepicker
Hi,
I have an inline editor and am using keys to tab and edit data. If i have a jquery UI datepicker field and do the following -
- Tab into the field, the datepicker appears as expected
- Choose a date with the mouse
- Hit tab to move to the next field
the cell has lost focus so hitting tab starts tabbing through the non datatables elements on the page.
Is there any way to suppress the blur event for that field (not the table) so it stays in focus? Is there a preblur event for the cell (not the table)?
I also get this problem when using the mouse to move the scrollbar in a selectize dropdown and I'm assuming it's the same issue. Some way of suppressing the blur would be useful if available.
Thanks.
Answers
Very good point. What we need to do is have the input refocus when the date is selected. We can do that with the
onChange
callback.If you search the Editor source for:
And add a comma at the end of that line and then add:
That will fix it.
I'll include that in 1.6.2.
Regards,
Allan
Thanks Allan,
I had to change the code to
onSelect: function () {
conf._input.focus();
conf._input.click();
}
Your suggestion would put focus back in the cell but if I hit tab it started tabbing through the non-datatables controls. With the click as well it works as I need. Thanks again.
Ah - because of the KeyTable integration...
I suspect that click is harmless without KeyTable, so I don't see an issue with that going in. Thanks for flagging that up.
Allan