The Problem is that the datepicker needs to know which format to expect. This String needs to be converted to a date value. If you don't specify a fix format, the datepicker could for example not differentiate between dd.MM.yyyy and MM.dd.yyyy when entering a date like 02.03.2018
AFAIK the validation for the default datepicker widget can't be overridden, so you might need to implement this function with text fields and regex.
You could also look into the date picker widget.
https://appstore.home.mendix.com/link/app/95230/TimeSeries/DatePicker