PM|AG: datepicker - refactoring... working sort of