Refactored date time picker