Some applications may have the need to fill in input date fields by picking up values from a pop-up calendar.
You may find plenty of tools to accomplish this job through a simple Google search.
That is exactly what I did. I picked up some GNU (General Public License) code from
and I wrapped it into an IBM i IFS directory named jsDatePick.
As I wanted to set up some demo, I took two of them among those available
and I changed them a little to make them work with two date input fields instead of just one.
I believe that they can be useful examples for several WEB programs.
I suggest that you run
- first, the basic demo 1 and demo 2
- then, a more sophisticated demo.
If you like these demos and you want to use the same techniques for some WEB programs of yours, this is what you have to do:
- Download the file jsdatepick.zip from the Easy400.net download page.
- Unzip the file, read the Readme memo and install the IFS directory /jsDatePick on your IBM i.
- Add to your HTTP instance the Apache directives documented in http_directives.txt and restart the HTTP instance.
- To run the basic demo from your HTTP instance, use the URI /jsDatePick/MyExample_jquery.html.
- To run the other demo from your HTTP instance, use the URI /jsDatePick/MyExample_jquery_full.html.
- If you selected as a model one of the basic demos(demo 1 or demo 2),
you may change the date format
from "%d-%m-%Y" to "%m-%d-%Y".
You may also replace the separator "-" with a character of your choice, blank included.
- If you selected as a model the other demo, you may change the date format
from dmy to mdy or to ymd.
If you specify a null value instead of a separator character, no date separators are shown. Examples:
- var datesep="-"; provides dates with separator "-" instead of "/"
- var datesep=""; provides dates with no separators.