Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DtPicker problem
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00815610
Message ID:
00817039
Views:
23
This message has been marked as a message which has helped to the initial question of the thread.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform