I am trying to attempt to call back a value from a function, however, the call back is always undefined because the jQuery Date Picker never has a chance to set the var sdat
$('#d1').datepicker({
onSelect: function() {
sdate = $(this).val();
//set value to the global variable (although not the best approach)
$("#dd").dialog("close");
}
});