OnSelect datepicker not working
I use it without a function as the argument like: jsfiddle

//id for nay_date input field     
$('#edit-nay-date-datepicker-popup-0').datepicker({
          onSelect: function(selectedDate) {
          alert(selectedDate);
        }
    });