More date editor keyboard copy bug fixes #417
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up to #416
There are two main changes here:
destroyElements
we need to guard against calling thedestroy
method of the flatpickr instance if that reference is already gone. This can happen when changing templates.destroy
method in the editor'sclose
method. It's actually not necessary to do thatdestroy
so often. The main thing that was trying to work around was the fact that the CopyPaste plugin apparently sets the value of the cell inputs to a space (" "
) sometimes. I don't really know why but it is mentioned here in one of the built-in editors. The key is it not let that screw up date parsing and formatting. So I've adjusted the flatpickr settings to more gracefully handle the space.Unrelated, I'm also adding the entire
.idea
directory to.gitignore
. I find sharing any of these IDE files to cause more trouble than it's worth.