fix an error where selecting a date caused an already  'ing error. Use  when calling element[0].focus()