option-tree
option-tree copied to clipboard
Datepicker not rendering in new List Item
There's a bug where the date picker is not being triggered when you create a new List Item because the date picker function is not triggered again.
The current code initialises each datepicker field on document ready. When you add a new List Item, the JS code is injected in the DOM but it does not evaluate because it is wrapped in the document ready wrapper.
In this PR, I've unwrapped the JS code from the document ready wrapper and added it after the input field. Document ready is no more needed since the new input field is already loaded in the DOM when the JS code is being evaluated. When you add a new List Item, the JS code injected will also be evaluated.