Fix the date and timepicker + template crash