If the old value didn't lie inside the new range, it was changed by the native control internally but the value stored by wxDatePickerCtrl itself remained unchanged, resulting in asserts later when the mismatch between them was detected. Closes #13189.