- Select the 'Simple Page' template.
- Choose all creation wizard defaults.
- Create two global variables. The $mydate variable will hold the selected date.
global $mydate, $mydate_calpos;
- In your HTML, add a textbox to display the selected date.
<form>
<input type="text" name="$mydate" size="10" readonly>
</form>
Note:
To prevent users from modifying dates without clicking on the calendar lookup,
add the 'readonly' property to the textbox.
- To add the calendar lookup:
-
Position your cursor to the right of the textbox field(after the '>' closing tag).
-
Right click and from the popup menu select 'Insert - Calendar Lookup'.
-
Select the datefield by clicking on the '...'. In this case select the $mydate variable created in step 3.
-
Select the date format by clicking on the dropdown box and choosing the desired format.
-
Generate and try your program.