implement datetimepicker and other minor fixes