updated datepicker plugin to add autoclose