Improve user experience as promised in [98d8e6].
Now, if one clicks OK in the date editor and the date is invalid,
it's switched into text mode and the dialog remains open,
so the user can either correct the date or type it as text,
no more loss of entered data happens.