got datepicker working. code needs further cleanup.