Updated datepicker to close on esc key or on blur