refactor our directive to datetimepicker