Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FYI : Setting datetimepicker value
Message
From
03/09/1999 12:48:30
 
 
To
02/09/1999 16:48:57
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00260511
Message ID:
00261250
Views:
30
>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform