The Shadow Posted April 26, 2004 Posted April 26, 2004 This example shows a date-picker table that can pop up in a new window to allow graphical editing of a date. You can see it with FM7, but there are a few custom functions it uses you won't be able to look it.
MoonShadow Posted April 26, 2004 Posted April 26, 2004 The Shadow may know .. but the Shadow also rocks! Thank you for sharing this with us.
Ocean West Posted April 26, 2004 Posted April 26, 2004 Shadow... thanks for shading some LIGHT on this
Lee Smith Posted April 26, 2004 Posted April 26, 2004 The Shadow said: You can see it with FM7, but there are a few custom functions it uses you won't be able to look it. Your post is confusing. This sounds like the file is for an earlier version of FM than FM7, but the file has the FM7 extension. Lee
MoonShadow Posted April 26, 2004 Posted April 26, 2004 Custom Functions require Developer to view their Code but anyone with FM7 can USE a file which contains them.
The Shadow Posted April 26, 2004 Author Posted April 26, 2004 I have updated the example, moving it to: http://www.spf-15.com/fmExamples/datePickWindow.fp7.sit I added a "datePick Options" layout that allows the specification of a list of holidays, which are then colored in blue. Today's date is also underlined now.
BruceJ Posted May 20, 2004 Posted May 20, 2004 Great solution, I love this one. For some reason, Today's date isn't underlined. However, the number of the day is colored in any month I look at.
The Shadow Posted May 20, 2004 Author Posted May 20, 2004 The original attachment didn't have that, only the one on my website has the underline for today: http://www.spf-15.com/fmExamples/datePickWindow.fp7.sit The red date is the "selection" date that will be put back into the selection field (in the exampleTbl table) when you click the "Close" button on the date picker. Blue dates are "holidays"; the "datePicker Options" layout controls what colors should be used for these two indicators, and what days are holidays.
Newbies Ellis Posted May 21, 2004 Newbies Posted May 21, 2004 I am new to the forum (and this is the first thread that I have looked at..).. and it's really neat! But can you explain a little how this can be incorporated into an existing database?
The Shadow Posted May 22, 2004 Author Posted May 22, 2004 Ellis, thanks for your compliment. As for how this can be incorporated, really only by recreating the structure inside your file. That sucks, so I made some improvements to break it apart, you can get a new copy at: http://www.spf-15.com/fmExamples/ and download the "multi-file" version of the date picker. Now, there is a "datePickUser.fp7" file, (with no custom functions in it), that shows how to call the date picker from the other (modified) "datePickWindow.fp7" file. Unfortunately, I could not figure out a way to copy back the date at the right moment without calling a script in the starting file, so you would need to duplicate several scripts for each file that you wanted to use it in (to send you back to the correct file). In general, it seems to me it works much better if you can copy its structure into your existing file, but you'll need Dev7 to be able to copy the custom functions. If anyone has any ideas for how to make this cleaner, I'm all ears. ;^)
Andy Robo Posted May 24, 2004 Posted May 24, 2004 Bloomin Awesome... I have an 'upgrade' suggestion - How 'bout a wee button that takes you back to 'today'? Other than that it is a thing of wonder... Andy
The Shadow Posted May 24, 2004 Author Posted May 24, 2004 Andy, Thanks for the suggestion, I've updated both versions with a button to goto Today's date between the month movement buttons. It only says "Tdy" so it fits in that spot, so you might want to change the layout if you have a better plan for it. http://www.spf-15.com/fmExamples/ I hope that makes it a solid "thing of wonder" for you.
Newbies magellan Posted May 29, 2004 Newbies Posted May 29, 2004 hi i note your great example has custom functions in it, i only have fmpro - and while using your file as an external reference the custom functions do not work how can i integrate this into a solution or do i have to go and buy fmdev? cheers
Newbies magellan Posted May 29, 2004 Newbies Posted May 29, 2004 pls disregard last post - worked it out with multiuser file thanks shadow - this rox!
AbsoluteVoice4u Posted August 1, 2004 Posted August 1, 2004 Shadow, you have really created one GREAT Date Picker. I downloaded both and I have to thank you sir....ya done good. I see where I will utilize several, in order to have it populate the corresponding field. Thank you.
Ugo DI LUCA Posted September 10, 2004 Posted September 10, 2004 Seem to me your other Win fans had no problem in downloading this sweet contribution
Computer Geek Posted September 13, 2004 Posted September 13, 2004 The Shadow certainly knows!!!!! Awesome!!!!!!!
iondesign Posted September 17, 2004 Posted September 17, 2004 I've rebuilt this fantastic tool into my database but... For some reason my days aren't counting properly (the 5 lines are all 1 to 7)...the scripts and specified parameters are correct BUT the only difference is that the "gLastDay" field for some reason refused to be a global field!! it says that as it is a calculation that references a global field, related feild, unstored field etc...please help! appreciate your time!
The Shadow Posted September 17, 2004 Author Posted September 17, 2004 This is a bug in 7.0v2. You need to make the field global when it doesn't have a calculation in it, once it decides to make it "unstored", you cannot manually switch it to global. Just delete the content of the gLastDay calculation, make it global, and put the calculation back in.
iondesign Posted September 18, 2004 Posted September 18, 2004 yay! thanks shadow...although i fixed it but the dates are still repeating themselves...i've obviously got another mistake somewhere...if i could only find it... thanks again! also for the speedy response!
The Shadow Posted September 18, 2004 Author Posted September 18, 2004 On my layout, I had changed the repetition numbers being displayed, the first line was showing only reps 1->7, the second 8->14, etc. Double-check that your layout is displaying the correct reps (found in "Field Format").
iondesign Posted September 21, 2004 Posted September 21, 2004 ahhhh...the breakthrough!! thank you thank you thank you! THIS is very exciting (well for me anyway....) CHEERS!
Bekah Posted September 29, 2004 Posted September 29, 2004 This is wonderful. My first attempt doesn't work. I don't know if I have something wrong in my script or what. The date appears in a portal of activities (activitydate). I originally put the date icon on the layout but also tried it inside the portal itself. When I click the button, it brings up the date window nicely. But when I choose a date then close, it just displays [esc] and pulses. Can it not be used in a portal? I changed the Start and End and Edit to the portal activity date field and re-checked it. I decided to ask because if it can't be used in portals it may not help me. Just about everything that has dates is in a portal. Thank you for helping. :-) Oh, i used the one with two files so the window is a separate file but the DateUser scripts I imported into mine. I checked them. Are they wrong? They look right honestly.
Bekah Posted September 29, 2004 Posted September 29, 2004 I figured it out all by myself! You have a script called Date Pick Close in datePickWindow. It says it doesn't need modification but I think it does. Because it references another script - date pick close from DatePickUser - which was the old example file. when I read your comment tht it didn't need changed, I didn't read any further. I'll let you know if that doesn't fix it but I'm pretty sure it will. So sorry for being new.
Steve Buchan Posted October 14, 2004 Posted October 14, 2004 Shadow ... thanks for this. Old with Oracle ... new wih FMPro . .. love what I see so far. I was able to open and play around with date picker .. question for you .. (sorry, I am new at this) .. but how would I copy this solution into an existing solution? Or do I call it using file references?
AbsoluteVoice4u Posted October 16, 2004 Posted October 16, 2004 Shadow, Shadow, Shadow......You're a class act, ma friend. Thank you for the post. It's most helpful. This forum is absolutely the best!!!
David Holmberg Posted October 23, 2004 Posted October 23, 2004 Clean and fast, it's a great date picker. It's just one thing - I find it annoying that the "main window" changes size as the "date picker window" appears, can I get rid of that?
MoonShadow Posted October 24, 2004 Posted October 24, 2004 Hi David, If your main layout is maximized, it will drop into windows mode (and assume a smaller stance). It needs to start out in window state first. Windowing and maximized will not work together. If you plan on using windows, give up maximized. So, set your main layout to Move/Resize. Something like: Height: Get ( WindowDesktopHeight ) - 4 Weidth: Get ( WindowDesktopWidth )- 4 Distance from top: 0 Distance from left: 0 Then, performing Date Picker will keep main layout the same 'full' size while the Date Picker window appears on top much smaller. I have one script called Full Window and apply this script to all 'full window' layouts, ie, this script is ran upon startup for the current layout. Layout switching alone leaves all 'full' layouts in this 'full window'd state.' In this way, they stay in place when a second window is called on top.
Newbies Toltecan Posted December 10, 2004 Newbies Posted December 10, 2004 This is a great solution, but watch out if you have other self-joins in the table that uses the picker... you can get some serious looping going ;-) Love to see a way to make this work across several solutions off a server... rather than within a single file... Cheers
Newbies Eaglmtn Posted March 26, 2005 Newbies Posted March 26, 2005 Shadow, I'm new to FM...having a lot of MS Access background. Is there not a way in FM to simply copy a complete table and paste it in another database; same with the scripts?! I've looked and don't see that capability--maybe I'm not sure what to look for. Guess what I'm asking is do I have to recreate the complete Date Picker in each database I want to use it? I would rather not have it "outside" the main file. I just bought Developer thinking that capability would be there. Haven't found it yet. I've worked in Access a lot and found it so much better to be able to work in a "dummy" database creating tables, queries, etc.--then simply copy them and paste them in the working database when they were working properly. Users could continue to work in the active database and I wouldn't have to worry about doing something that disabled the working copy. Thanks!
Newbies Eaglmtn Posted March 29, 2005 Newbies Posted March 29, 2005 Shadow, I'm new to FM...having a lot of MS Access background. Is there not a way in FM to simply copy a complete table and paste it in another database; same with the scripts?! I've looked and don't see that capability--maybe I'm not sure what to look for. Guess what I'm asking is do I have to recreate the complete date picker in each database I want to use it? I would rather not have it "outside" the main file. I just bought Developer thinking that capability would be there. Haven't found it yet. I've worked in Access a lot and found it so much better to be able to work in a "dummy" database creating tables, queries, etc.--then simply copy them and paste them in the working database when they were working properly. Users could continue to work in the active database and I wouldn't have to worry about doing something that disabled the working copy. Thanks!
Vaughan Posted March 29, 2005 Posted March 29, 2005 Scripts can be imported between files, but some field references may be lost if relationship names are not identical. Tables cannot be imported natively, but a third-party product (FM Robot?) can do it.
Fei Long Posted June 17, 2005 Posted June 17, 2005 How do I get this to work in Instant Web Publishing solutions ? When I press the date pick button, the calendar did pop up but you are not able to select your date.
Recommended Posts