Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker not rendering in new List Item #711

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

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