Page 1 of 1
Use NinjaCal as a date input control
Posted:
Sun Apr 04, 2010 11:33 pm
by kai
I'd like to use NinjaCal as a date input control - like a bigger version of the filemaker drop-down calendar.
I'm a bit of a novice when it comes to FileMaker scripting and was wondering how I can click on a date in NinjaCal and have it set a field to the date that the user selects.
Thanks,
kai
Posted:
Wed Apr 07, 2010 7:27 am
by John Sindelar
Hi Kai,
(Sorry for the late reply; I don't know how I missed this!)
So yes, you can use NinjaCal for this. When you click a date in NinjaCal it is stored in a global variable: $$__NinjaCalSelectedList
And you can the use a regular SetField step in a script to set any field you'd like to the contents of $$__NinjaCalSelectedList
This is easiest with a second button (like an OK or Apply) button that would be beneath the NinjaCal widget. So a user click a date in NinjaCal (the date goes into the global variable) and then they click OK and your script shoots that global variable into a field in your solution.
You can go further an edit the NinjaCal script itself so that your field gets populate as soon as they click on the date in NinjaCal. To do this, edit the NinjaCal script and add your new steps after the comment "automatically create a date range expression"
Hope that helps,
Posted:
Wed Apr 07, 2010 1:01 pm
by kai
Hi John,
Thanks for that - I'll have a crack at editing the script so that it happens automatically when they click the date.
Cheers,
Kai