Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FYI : Setting datetimepicker value
Message
De
04/09/1999 05:19:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/09/1999 12:48:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00260511
Message ID:
00261495
Vues:
25
>>>>>I really want to use "value" in fact. Anyone that knows a way to make it work with "value" are wellcomed.
>>>>>Cetin
>>>>
>>>>Cetin,
>>>>
>>>>If you plan to bind this control to a data field, you might as well give up now... it is not doable based on the way the control works.. and no one i have talked to has been able to get it to work.
>>>>
>>>>BOb
>>>No I'm not using it to bind to a controlsource :) Apart from its "value" property, before I did that indirect though. In change event I set dData.value to :
>>>
ctod("^"+str(this.year,4)+;
>>>	"/"+padl(this.month,2,"0")+;
>>>	"/"+padl(this.day,2,"0"))
Now I hit another interesting problem and I could give up even w/o binding :)
>>>The problem is that I couldn't set it to an empty date yet (.null. didn't work). In help it gives a range starting from year 1753. If this is the case how VBers have an empty date using this ? Set forecolor, backcolor to same ? I'd appreciate any help on this.
>>>Cetin
>>
>>That's the reason we couldn't use it bound to a date field. It is supposed to accept a null, but it validates the null... however, the min and max caqn not be set to null so you have a catch 22-... This control can ONLY be used if you ALWAYS have a date in it... Perhaps to define report ranges, etc.
>>
>>We reported this as a bug, but never got a response from good ole MS.
>>
>>BOb
>
>I ran into this same problem recently. I wanted the functionality of the Datepicker, but I needed the ability to blank out the field. Since Datepicker won't do that, my solution was to use a standard texbox bound to my date field, then take the datepicker, shrink it down so that only the dropdown arrow button is shown, and put it to the right of my actual date field. Then, in then Closeup event, I put the code in to change the date field's value. Not the slickest way to do it, but functionally, it works great.
>
>Chad
Similar solution :) I play with the visibility and focus of a textbox and dt control. MS is exercising our capabilities :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform