cloned from https://github.com/kristianm/calendar_date_select