Here is a modification to your code to handle both the text input of date, and the numeric input of date. Also note that one has to add rows to the data table before they can be populated.
Names Default To Here( 1 );
dt = New Table( "Untitled",
New Column( "Date 1", Numeric, "Continuous", Format( "yyyy-mm-dd", 12 ) ),
New Column( "Date 2", Numeric, "Continuous", Format( "yyyy-mm-dd", 12 ) ),
);
dt << add rows( 1 );
q = New Window( "Enter Dates", // Window for entering dates
Spacer Box( size( 500, 30 ) ),
H List Box(
Spacer Box( Size( 100, 10 ) ),
V List Box(
Spacer Box( Size( 10, 15 ) ),
Text Box( "Enter Dates (yyyy-mm-dd)" ),
Spacer Box( Size( 10, 20 ) ),
Text Box( "Enter Date 1" ),
Spacer Box( Size( 10, 10 ) ),
fontobj = da = Number Edit Box(),
da << Set Format( Format( "yyyy-mm-dd", 12 ) ),
da << Set( Date MDY( 12, 31, 2000 ) ),
Spacer Box( Size( 10, 10 ) ),
Text Box( "Enter Date 2" ),
Spacer Box( Size( 10, 10 ) ),
fontobj2 = db2 = Number Edit Box(),
db2 << Set Format( Format( "yyyy-mm-dd", 12 ) ),
db2 << Set( Date MDY( 12, 31, 2000 ) ),
),
),
Button Box( "Continue",
dt:Date1[1] = da << get;
dt:Date2[1] = Informat( db2 << get text, "yyyy-mm-dd" );
//code for adding dates to data table
q << closewindow;
)
);
Jim