Fix datepicker error