You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple enough! Looking at the code, it seems like Focus and MouseDown differ in whether they set forceOpen, which determines whether the picker will close when blurred. I don't have a strong opinion, but would you intuitively assume something called open would force the picker open, or just transitorily open it and allow it to close itself?
If you open the picker via the method I created it will stay open until you select a date (because the blur event which would usually happen never gets triggered). For me forceOpen would mean that the datePicker wouldn't close when I select a date. Personally this is the not behaviour I am interested in and so have not exposed that, but it could be done in a similar way.
open is also consistent with the isOpen function, which is looking at the open attribute (and not forceOpen)
I have added another commit with a close method, which triggers this blur event (so that I can close the datepicker if the user loses focus of my other input) and tidied up the comments a bit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
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.
Potential solution for #85
Reason for diffs on other lines is due to elm format being automatically run. Can remove these changes if required.