Datepicker fixes + started writting unit tests