Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DatePicker problem
Message
 
To
31/10/2003 11:04:09
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00845012
Message ID:
00845025
Views:
18
>Hi,
>
>I'm using the OLEclass 'MSComctl2.DTpicker.2' in my application to allow the users to pick a date using the calendar. Sometimes I have to programmatically change the value of the olecontrol...
>
>************
>
>Local lcDate
>lcDate = iif(!Empty(Deals.Nextcalc),Deals.Nextcalc,Date())
>
>this.parent.olecontrol1.day = day(lcdate)
>this.parent.olecontrol1.month = month(lcdate)
>this.parent.olecontrol1.year = year(lcdate)
>
>************
>
>...everything is Ok until the day of the new date is the 31st of the month,
>Then code line 'this.parent.olecontrol1.day = day(lcdate)' generates the error 'Invalid property value'.
>
>Any clues about what's going on?
>
>Thanks in advance.
>

Try changing day to 1 then change year, month, followed by day. It seems to validate when each property changes. If you change the day to 31 when the month contains 9 then it will reject due to only 30 days in September.
>Paco Calvente
>Logotech Systems
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform