<script>
//connect to the web socket when the page is ready.
$( document ).ready(function() {
//set the date picker and also bind the event.
$("#datepicker").datepicker({
onSelect: function(dateText, inst) {
//raise the event.
b4j_raiseEvent(this.id + "_select", {});
},
showButtonPanel: true,
dateFormat: "mm/dd/yy"
});
b4j_connect("/datepicker/ws");
});
</script>