Skip to content

Datepicker not rendering in new List Item#711

Open
rrikesh wants to merge 2 commits intovalendesigns:masterfrom
rrikesh:patch-1
Open

Datepicker not rendering in new List Item#711
rrikesh wants to merge 2 commits intovalendesigns:masterfrom
rrikesh:patch-1

Conversation

@rrikesh
Copy link

@rrikesh rrikesh commented May 27, 2019

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.

rrikesh added 2 commits May 27, 2019 08:49
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant