date-selector: clear code, improved set_date func