Purpose
Create a date entry field
Solution

Use an InputField with option -date. The field size is automatically set to 10:

InputField (2,2) "Order date" (2,20) name="orderdate" -date

The user may enter a date in short notation or use the calendar searchhelp:

 This is transformed to the normal date format (user specific format) with the next "Enter":

The first time a date is entered in a SAP GUI session GuiXT needs to read the user date format via RFC. This means that you need a valid RFC user and password in GuiXT profile for using the -date option. If you are sure that all users work with the same date format, e.g. DD.MM.YYYY, you can specify this date format with
 

ProcessingOption
dateformat="1"

in the GuiXT "session" script. Here "1" is the SAP short notation for the date format:

"1"
: "DD.MM.YYYY"
"2"
: "MM/DD/YYYY"
"3"
: "MM-DD-YYYY"
"4"
: "YYYY.MM.DD"
"5"
: "YYYY/MM/DD"
"6"
: "YYYY-MM-DD"

This avoids the RFC call for the user date format.

In any case the calendar search help is available for the entry field:

GuiXT does not check the date automatically; use the "CheckDate" command with a suitable error message in your InputScript before using the date entered.

Components
InputAssistant