Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6795 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

  • 4 weeks later...
Posted

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.

Posted

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
Posted

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?

Posted

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. ;^)

Posted

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

Posted

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. wink.gif

  • Newbies
Posted

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

  • 2 months later...
Posted

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. You-Rock.gif

  • 1 month later...
Posted

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!

Posted

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.

Posted

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!

Posted

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").

Posted

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. confused.gif 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.

Posted

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. blush.gif

I'll let you know if that doesn't fix it but I'm pretty sure it will. smile.gif So sorry for being new. crazy.gif

  • 2 weeks later...
Posted

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?

Posted

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.

  • 1 month later...
  • Newbies
Posted

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

  • 3 months later...
  • Newbies
Posted

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
Posted

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!

Posted

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.

  • 2 months later...
Posted

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.

Ask.gif

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.