fix error handling on selectdate