This is due to the sequence in which the control changes its values. For instance, if the current value MONTH value is a month with 30 days (eg June), then changing the date to 7/31 will cause an error IF the sequence is that the DAY value is changed first, followed by the MONTH value.
I use the following code when initialising a date value
IF NOT EMPTY(EVAL(this.mysource))
this.year = YEAR(EVAL(this.mysource)) && the year must come first in case of leap years (Feb-29)
this.month = 1
this.day = DAY(EVAL(this.mysource))
this.Month = MONTH(EVAL(this.mysource))
ELSE
* we need to clear
this.year = YEAR(DATE())
this.month = 1 && to avoid problem when changing to 31st day
this.day = DAY(DATE())
this.Month = MONTH(DATE())
ENDIF
regards,
Alain.
>Hi all, I have a form which uses a DtPicker control to select a date, the value of the control is set to the DATE() value in the INIT event. Everything was working fine until today. When I try to set the date to 07/31/2003 I get the error message:
>
>Invalid property value
>
>
>I did a search in the Knowledge base and the file Q253785 suggest a way to solve this problem, I tried it but didn't work. The problem seems to be that the dtpicker control does not recognizes the 31th day as a valid day because when I changed the date to for example 08/31/2003 I get the same error message. This error message seems to occur only with this particular day of the month.
>
>Can anybody suggest a workaround for this problem?
>
>TIA,
>
>Enmanuel