Code Refactored
- date format on input