I wish to do something like this:
var showme = false;
$(\'#mydatepicker\').datepicker({
beforeShow: function(input, inst) {
if(!showme) {
It might be better to simply control the showing of the datepicker with the disable and enable method parameters.
$('#mydatepicker').datepicker('disable'); //Don't show datepicker
$('#mydatepicker').datepicker('enable'); //Show datepicker
It would seem to accomplish the same purpose that you are seeking.