SandStorm’s Date Time Picker
I made the other day the SSCal class and I thought to myself, who or what is keeping me from creating a datetime picker? And the answer is no one and nothing. And so you are seeing now the newly created SSDTPicker class.
Brief Introduction to some Features:1. Well of course, first and foremost would be, it is 100% Native VFP.
2. It comes with a variety of 5 colors again. On normal stage (when calendar is not visible), the current color will be reflected by the button in the right side.

To hide it back, click again the button. That button toggles between showing and hiding the popup calendar.
3. Unlike the ActiveX DTPicker’s popup which cannot stay open when you click on another object, this one can

4. It auto-adjusts itself (and auto-resizes as well) to follow whatever the current SET DATE setting is:
5. Working with the class value is as simple as these:
x = thisform.ssdtpicker1._value
INSERT INTO MyTable (flddate) VALUES (thisform.ssdtpicker1._value)
REPLACE flddate WITH thisform.ssdtpicker2._value IN MyTable
Messagebox(thisform.ssdtpicker1._value)

Declaring the initial values is easier, in the Init Event of that class’ instance in a form:
This._Value = date()
This._Color = “blue”
6. In the tradition of a DTPicker, clicking “Today” will bring you back to the current date. The calendar will likewise be repainted back to current date.
7. Like any other DTPicker, you can manually encode the date on the date box.
8.
No graphics used whatsoever which lessens additional weight to a project. The whole class is composed of labels, containers, etc. But not a single image is used.
9. And since it is
100% VFP, it will not introduce problems to your project which sometimes an ActiveX do.
Shift of Style:Some people are maybe wondering why I suddenly changed attitude from simply attaching whatever it is I am trying to share into doing it on a request basis which means more further work on my side. But lately I felt some of my contributions are not that appreciated, I don’t know exactly why that feeling and what has fired it. But it happened. I actually thought before of stopping contributing further but the feeling has subsided.
I believe I am not alone in that appreciation thing so I will be so bold in saying I will be speaking in behalf of some if not most of the contributors of Weblogs. We need feedback of how things work out on your ends.
So to avoid having that ugly feeling again, in my end, I decided to “know” who is really interested in any of my new ideas (except when it is pure tutorial). And being the author of whatever it is I am sharing or will share more in the future, I am entitled to this decision.
I think you can see from the above what this class can do to enhance your project. If you like it, all you need to do is request; if you don’t like or don’t feel like requesting for the class from me, then it is you loss not mine!
However if you can wait for me to change mind again in the future, then you can simply wait for that to happen. Who knows? Out of a whim, I may suddenly place the attachment here again one time?
Enjoy!
Update December 8, 2009:The old one can not cater versions lower than 9, this one does. There are some more changes inside:
a. Removed declaration of Zorder(1) in the init which brings the class in the back of other objects (a bug). Only the zorder declaration in toggling visibility of popup calendar is needed, thus, retained.
b. Added the ability to show or not show "today" section. Depending on the taste of the user, sometimes without the today section looks better. By default it is shown, to remove it add this in the init event of the class' instance in a form:
this._notoday = .T.
c. Enlarges a little bit the days and weekdays objects to make things more readable. Adjusted the popup calendar size as well.

d. Added a shape in replacement of the commandgroup for month navigation which will err in versions lower than 9 as it uses command button's backcolor property which do not exists yet in the older versions. So when you are running below 9, shape object will take control of showing the colors of the calendars plus toggling its visibility ON and OFF.
e. For versions lower than 7, I remove the Themes capability.
There are some more minor adjustments as I am trying to make this run on versions lower than 9 as well like the SpecialEffect properties. I created this class in 9 and I really don't know if somebody will take an interest in this one before so I never minded preparing this for other versions. Now I believe I have done that.
So to those who already have this who might experience some problems with this class, please inform me via email so I can attend to it. To those who still only have the first version, I will update you via email later today. You have my email address now so if something needs bringing into my attention, please bring it to me. Cheers!
Update: December 26, 2009
I already have submitted the classes for free and easy download to Eric
for the download section of foxite, so you will see those pending the
decision of Eric. In addition, I have created a thread in coderisland
to have the same available for download. Please click on the link
below:
http://www.coderisland.com/forum/viewtopic.php?f=10&t=254