fix date formatting, add onSelect for calendar