newbie - events on datepicker

newbie - events on datepicker

Sorry, very new to JqueryUI and this is a simple question. I am using the datepicker inline and I'm trying to retrieve the selected data value but can't figure out where I'm going wrong? Any help greatly appreciated.
 
$(function(){

 // Datepicker
 $('#datepicker').datepicker({
  inline: true
 });
 
 $('.selector').datepicker({
    onSelect: function(dateText, inst) {
     alert(inst.value);
    }
 });








});