v4: prevent setting an invalid date
Merge branch 'v4/invalidDate' into v4merged