I know I don't know jack about all this, but if the little dropdown window actually has 4 digit years, then shouldn't the "getter" get the year from the dropdown window, and not the text in the control? I input 1975.
It's not that simple.
Users can type into the control, not using the dropdown calendar.
At the moment you read Date, the control does not know wether you typed it or used the calendar to fill it.
Note: if DirectInput is False, it does
not parse the text, but it uses the internal field FDate (which is set when using the calendar).
So, if you give the user the ability to type (DirectInput=True, which is the default), you're basically screwed if you use a 2-digit year.
If you insist on having a 2-digit year (which IMHO is a WTF in itself), then set DirectInput to False.
And yes, we could add some overhead to keep track of how the date was entered (in case of DirectInput=True), but it would lead to inconsistencies: if you use the calendar (in your example) it gives the correct date, if you don't it gives you the incorrect date.
I don't think we'll add such logic.
So, you have 3 solutions:
- Use a 4-digit year (IMO the preferred solution)
- Set DirectInput=False
- Use another control and do the logic yourself
Bart