Fixed #17401 - SelectDateWidget doesn't display erroneous values

Integrate patch from ticked and added test.