Please change this so that the parsers return a real date and you call date.getTime() only in dynamicDateInputType for checking the min/max value. By this you don't change the date back to an integer and then back to a Date again.