The bootstrap datepicker in the app store has this functionality:
https://appstore.home.mendix.com/link/app/1799/
You can make a microflow in the change events of the datepicker. In that microflow, you check if the date is correct, if not, you display an error message and/or you change the date of the attribute linked to the datepicker.