I also refactor the code. Removed duplicate calling of datetimepicker