Behavior for #datepicker onselect not working
jQuery(document).ready(function() {
    jQuery(".datepicker").datepicker({
        showOn: "button",
        buttonImage: "/images/calander.png",
        buttonImageOnly: true,
        changeMonth: true,
        changeYear: true,
        maxDate:'0',
        onSelect: function (selectedDateTime){
                //alert("here");
            } 
    });
 });


you can also write above code in js file