Last active
August 29, 2015 14:16
-
-
Save joshterrill/3acb46a285ae9cc05771 to your computer and use it in GitHub Desktop.
code that allows the datepicker() to focus first without showing the calendar UI until input field is clicked
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
function cwUtil_focusDateInput(name) { | |
var selectedInput = $("[name='" + name + "']"); | |
$(selectedInput).focus(); | |
$(selectedInput).on("click", function() { | |
$(this).datepicker(); | |
$(this).focus(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment