Welcome to Foxite.COM Community Weblog Sign in | Join | Help



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

Published Monday, December 07, 2009 1:46 AM by sandstorm36
Filed Under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: SandStorm’s Date Time Picker

Monday, December 07, 2009 7:09 AM by Chaim
Hi Jun,

Your products is amazing.

Why didn't you sent it to Bill Gates before the decision to stop with foxpro?:)

Can you please send me a copy (also for the previous cools).

I give here another email:tsvikivolkan at gmail dot com.

Thank you

#  Hello Chaim, Thanks for the nice words.  I am just working on a lot of things I can think of these days as I am still on vacation.  Very soon I will have to go back doing what is really expected of me, my real job (I.T.), and eventually I have to slowdown on contributing here.

All three latest classes is sent to your email, i.e., Switchbox, SSCal and SSDTPicker. 

Cheers!

# re: SandStorm’s Date Time Picker

Monday, December 07, 2009 7:52 AM by Spion
Hi,its cool!
would u send it to me. my email
spions09 at yahoo dot com

# Thanks!  Sent to your email

# re: SandStorm’s Date Time Picker

Monday, December 07, 2009 9:11 AM by Vladimir Martinovski
I like to test it also. Look great like this.

vladimirm at fx dot com dot mk

#Well please do.  Please come back to me when you have problem.  Sent to your email.  Cheers!

# re: SandStorm’s Date Time Picker

Monday, December 07, 2009 11:17 AM by Dan
Hi Jun, You know its awesome how you develop tools to tame everyday's hitches, when i had a problem with a datepicker in a grid, you gave me the "How to tame a datepicker in a grid animal" Now i cant wait to try this new class. Please do send it to me. My email is: sleek at yahoo dot com.
Thanks alot

#Thanks for the compliment Dan.  I just do what I can.  Please find in your email the dtpicker class. Get back to me when you have a problem with this one.  Cheers!

# re: SandStorm’s Date Time Picker

Monday, December 07, 2009 3:50 PM by Victor Espinoza
Hi Jun,

Your classes look very nice. I would also like to test them. Please send them to victoresp at hotmail dot com.

Thanks!

#Thanks! Sent to your email.

# re: SandStorm’s Date Time Picker

Tuesday, December 08, 2009 4:09 AM by Nestor Buelva Jr.
Very nice class. I will love it. I used to use ActiveX DatePicker class. This will save me a lot of maintaining and distributing headache when using ActiveX controls.
Please send me the class to nestorj2000 at yahoo dot com.

#Thanks.  Your email is rejecting my mail.  Please check the email address you have provided above.  Or provide me with another one

# SandStorm’s Date Time Picker

Tuesday, December 08, 2009 8:22 AM by Sanjay Karia
Hi Jun,

I also want to use your class. Can you send updated classes of Switchbox, SSCal and SSDTPicker on my email address it is
kariasanjay at rediffmail dot com

Thanks!

#Sent to your email.  Cheers!

# re: SandStorm’s Date Time Picker

Tuesday, December 08, 2009 1:08 PM by Tanveer ul hassan
its very nice and cool. can you send me with thanks.
mthassan2000 at yahoo dot com

#Thanks!  Sent to your email.

# re: SandStorm’s Date Time Picker

Tuesday, December 08, 2009 6:53 PM by Byron Santizo
I also want to use your class. Can you send updated classes of Switchbox, SSCal and SSDTPicker on my email address it is
ByronSantizo at hotmail dot com

#Sent

# re: SandStorm’s Date Time Picker

Tuesday, December 08, 2009 7:32 PM by Joey Carroll
Hi, please send these fantastic classes to me at joeydcarroll at gmail dot com

Keep up the good work!

#Sent

# re: SandStorm’s Date Time Picker

Tuesday, December 08, 2009 10:39 PM by alwy ali
Hi Jun
this is a cool thing it going to make life more managable. Can you please send to me via my email
alialwy at hotmail dot com

Thanks In Advance

Alwy

#Sent

# re: SandStorm’s Date Time Picker

Tuesday, December 08, 2009 11:35 PM by Miguel
Good work! Please send a copy to mlopez dot bo at gmail dot com  Thanks for sharing.

# Welcome.  Sent

# re: SandStorm’s Date Time Picker

Wednesday, December 09, 2009 1:50 AM by Nestor Buelva Jr.
Sorry, I forgot one character.
The right email is nestorbj at yahoo dot com
Thanks again.

#Sent to your email

# re: SandStorm’s Date Time Picker

Wednesday, December 09, 2009 4:55 AM by Nestor Buelva Jr.
Thanks for the SSDtpicker class you sent. It's wonderful. Can you sent me the Switchbox, SSCal class also?

nestorbj at yahoo dot com

#Done!

# re: SandStorm’s Date Time Picker

Wednesday, December 09, 2009 9:35 AM by Imran Syed
Amazing Work Jun
as usual you bring unique ideas in VFP
great work, can i have a copy to try and implement it in my application with your kind permission.
regards,
imran
ihsyed at yahoo dot com

# Of course, sent to your email.  Cheers!

# re: SandStorm’s Date Time Picker

Wednesday, December 09, 2009 8:58 PM by Marian
Hi Jun,
it`s perfect work!

pls, send me  Switchbox, SSCal and SSDTPicker to
infos at infos dot sk
Thx. Marian.

#All three classes sent to your email

# re: SandStorm’s Date Time Picker

Wednesday, December 09, 2009 9:50 PM by Marian
Hi Jun!

Its perfect work!
Pls, can you send updated classes of Switchbox, SSCal and SSDTPicker on my email? Thanks. Marian.

# Please check your email, sent

# re: SandStorm’s Date Time Picker

Wednesday, December 09, 2009 11:56 PM by Petr Zugar
Very nice class. Please, send me your class Switchbox, SSCal and SSDTPicker on my email.
zugar at jvk dot cz
TIA

#All three classes sent to your email

# re: SandStorm’s Date Time Picker

Thursday, December 10, 2009 8:06 AM by ken knorr
Cool, would you send this also.
kknorr at logoscms dot com

# Sent as well in your email.

# re: SandStorm’s Date Time Picker

Thursday, December 10, 2009 8:32 AM by Jarda
Great work, please send me a copy

#Sent to your email

# Email Address

Thursday, December 10, 2009 1:58 PM by sandstorm36
December 10, 2009

Please do not use the URL section in posting your email addresses.  I am finding it hard to get the proper email that way.  Also sometimes, I simply forgot to check it.

Further, I will suggest now that you put here your proper email address without resorting to "at" and "dot".  I remembered that I need to approve any comments so I can change it before showing it here later.  

That is the reason why sometimes you cannot see immediately your comments/requests.  I have seen and deleted some double request in that maybe the requestee thinks her/his comment/request has not gone through.  It does.  However it still needs to be approved by the author of the blog to determine whether it is a spam or a real one.

To those who have found problems, please inform me.  So far everybody seems to be satisfied.  So once again, Enjoy!

Thanks!

Jun

PS.  I just realized today that sometimes I inadvertently replied to weblogs instead of the requestee themselves.  In which case, if you haven't received a class from me, don't hesitate to inform me on my email.  My  apologies

# re: SandStorm’s Date Time Picker

Thursday, December 10, 2009 2:01 PM by N. K. Patel
That's great !!
I am interested in your great work.
Please send me those classes at
nareshdhakecha at gmail dot Com

#Thanks!  Sent to your email!

# re: SandStorm’s Date Time Picker

Thursday, December 10, 2009 7:26 PM by RMCollection
Hi,
great job!

Can you please send your class.
info at wawi3 dot de

#  Thanks!  Sent

# re: SandStorm’s Date Time Picker

Friday, December 11, 2009 5:18 PM by Tareq Safarini
the class is very nice, i would like to have it
please.

# Sent!  Please do not use the URL section of the comment next time for your email.  I am finding it hard extracting the email address there.

# re: SandStorm’s Date Time Picker

Friday, December 11, 2009 6:44 PM by drserhio
Nice work!
Please send me your classes.  
drserhio at gmail dot Com

#Sent to your email, thanks!

# re: SandStorm’s Date Time Picker

Saturday, December 12, 2009 2:18 AM by Cesar
Hi Jun,

You said in this post:
>>... "to avoid having that ugly feeling again, in my end, I decided to “know” who is really interested in any of my new ideas ..."

Please don't do that !!!
Look, it took me about almost a week till I decided to ask you directly to send me the ssCalendar class from a previous post. Just because I did not want to publish my email in a blog comment. When you take that attitude, believe me, you are limiting the quantity of people that will appreciate your work.

ANother thing is that people do always recommend some links, and doing that people will share those files directly.

I suggest that you can upload your files to a separate server, that will allow you to have a downloads counter.

Please understand that these files need to be very easy to be accessed, and tested. You have great ideas, and a very nice eye for design.

FYI: I've adapted the ssCal class and it's already in my app.

It's really fantastic to have feedback, but sometimes it does not happen, for many reasons, and believe me, zero feedback does not mean that people did not apreciate your work. Suddenly you'll find references to some posts of your on the web !!!

#Thanks Cesar for the kind words and trust.  Please read my Why? blog.

# re: SandStorm’s Date Time Picker

Saturday, December 12, 2009 6:37 AM by Dawn
Great Work Jun
send me your class Switchbox, SSCal and SSDTPicker on my email.
dawn dot evalone at hotmail dot com

#Sent to your email.

# re: SandStorm’s Date Time Picker

Sunday, December 13, 2009 3:22 AM by Chandu
Hi Jun,

Your classes look very nice. Please send them to ctrktr at gmail dot com

# Sent to your email

# re: SandStorm’s Date Time Picker

Monday, December 14, 2009 6:42 AM by Naeem
Hi,

Great work. Please send me your classes to just123go at hotmail dot com

Thanks

# Please check your email.  Cheers!

# re: SandStorm’s Date Time Picker

Monday, December 14, 2009 9:34 AM by boudewijn lutgerink
Hi Jun,

next time you develop such a nice class attach the code to the message, you then save yourself a lot of time.
Now I line up with the others, please send it to B dot Lutgerink at betuwe dot net, I am in absolute need for this for one of my apps.

#LOL!  I am going to make it downloadable but that would be next year BL!  For now, please be patient with my little experiment.  I will send all three classes to you so in case you also think later of wanting the other 2, you need not request anymore. 

And I am not exaggerating when I say to all of you that you will love more the upcoming next 2 classes!  One will be my pre-Christmas gift to "interested" people and the other as pre-New Year gift.  Cheers!

# re: SandStorm’s Date Time Picker

Tuesday, December 15, 2009 4:11 PM by Hernan
Great work and is nice to see that people still create helpful classes in VFP.

Please send me the files to hedg at prodigy dot net dot mx

#Well, VFP is really a very powerful tool and very easy to use.  As long as we can come up with new tricks, I believe it will last long.  Sent!

# re: SandStorm’s Date Time Picker

Wednesday, December 16, 2009 8:18 AM by curie
so cute!!!
please send me a copy.. please please..
(gudgadglenda at yahoo dot com)
nice work!!!
thanks a lot..

#Well I am thinking of the song "to all the girls I loved before!" when I made those (kidding). Big Smile <img src=" />

I am glad you like it, please check your email.  Sent

# re: SandStorm’s Date Time Picker

Wednesday, December 16, 2009 5:35 PM by Zdenek Karas
Hi Jun,

Your classes look very nice. I would also like to test them. Please send them to karas at zliv dot net.

Thanks!

# re: SandStorm’s Date Time Picker

Wednesday, December 16, 2009 7:24 PM by Son, Nguyen Hong
Your class so cool!

Thanks for your unlimited creation with VFP.

Please send me a copy to daisygroup at gmail dot com.

Many thanks !

# re: SandStorm’s Date Time Picker

Tuesday, January 26, 2010 9:52 AM by rommel
Great work kababayan! This will truly improve the look of our applications.

Please send me those classes at
rommel dot david at ever dot ph

#Hello Rommel.  Thanks for the nice words.  Please read the last message above of this blog (not the comments) as I already gave the links where it as well as the other 4 classes can be downloaded.

What do you think?

(required) 
required 
(required)