Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DatePicker problem
Message
 
À
31/10/2003 11:04:09
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00845012
Message ID:
00845025
Vues:
19
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform