Ticket 7602: Stop datepicker from appearing with beforeShow event handler #378
Closed
joekarl wants to merge 2 commits intojquery:masterfrom
joekarl:master
Closed
Ticket 7602: Stop datepicker from appearing with beforeShow event handler #378joekarl wants to merge 2 commits intojquery:masterfrom joekarl:master
joekarl wants to merge 2 commits intojquery:masterfrom
joekarl:master
Conversation
Small patch to allow stopping the datepicker from a beforeShow event handler. Just checking to see if the return from the beforeShow handler is === false. If it is === false then we return the same way as if the datepicker is disabled.
Member
|
You're trying to make the beforeShow event cancelable basically right? Can you perhaps make a ticket for this in the bug tracker? http://jqbug.com/ui/new |
Author
|
Created a ticket. http://bugs.jqueryui.com/ticket/7602 |
Member
|
This needs a unit test and the demo should be removed. |
Removed uneeded demo Added test cases for before show returning false, truthy, and true
Author
|
Demo removed and unit tests added. |
Author
|
Unit test is in tests/unit/datepicker/datepicker_tickets.js Ticket 7602: Stop datepicker from appearing with beforeShow event handler (0, 3, 3) |
Member
|
Thanks, landed in d146297. |
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Small patch to allow stopping the datepicker from a beforeShow event handler.
Just checking to see if the return from the beforeShow handler is === false.
If it is === false then we return the same way as if the datepicker is disabled.
Also added demo page for this functionality.