Package WebGUI::Macro::YUIDateChooser
DESCRIPTION
Macro for displaying a YUI (http://developer.yahoo.com/yui/) popup calendar attached to an input tag as specified by input_field_name.
process ( ["libs"], input_field_name, [calendar title], ["options"] )
libs string
Includes the required popup calendar and style libs.
An optional string containing the pattern "libs" which should be used only once in the page layout Metadata
"Extra <head> elements (tags)" field. Ex: ^YUIDateChooser("libs");
input_field_name string
The input tag field name.
Ex: ^YUIDateChooser("","requested_date");
generated tag: <input type="text" id="requested_date" name="requested_date" style="position:static;"/>
"calendar title" string
The title of the calendar.
Ex: ^YUIDateChooser("","requested_date","Service date:");
"options" string
Extra options that will control date validation..
Ex: ^YUIDateChooser("","requested_date","","required:true");
options:
required:[true│false] default = false
if set to true the input tag must contain a valid date
TODO:
- Input tag validation (required/proper date/etc...) - DONE!

- Float the calendar to the right of the input tag (proper flow) - DONE!
- Internationalize (i18n) - Done!

Setup:
The distributed zip file has the proper directory structure for WebGUI. Make sure you include the DateValidationLib.js file in the meta tags. The best place to put the script tag is in the page layout "extra head elements (tags)" in the form <script src="^Extras(DateValidationLib.js);"></script>.
Troubleshooting: If you get javascript page errors such as:
Date.isValid is not a function
Make sure you have included the DateValidationLibs.js in your head tags.