Here's a modified version of Georgia's script that uses Number Edit Box instead of directly using the Calendar Box. Number Edit Box has a popup version of the calendar build-in if the numeric format is set to a date. I set the format to only include the day, but you can include time-of-day as well if you need that level of granularity.
Names Default To Here( 1 );
tmpstr =
"SELECT pen_parametric.pn_id, pen_parametric.equiplk_ky, parametric_dlk.paramlk_ky,
FROM MATS.parametric_dlk parametric_dlk, MATS.pen_parametric pen_parametric
WHERE parametric_dlk.paramlk_ky = parametric_ref_llk.paramlk_ky
AND parametric_dlk.paramlk_ky = pen_parametric.paramlk_ky
AND ((pen_parametric.part_dm Between {ts '^sdt^'} And {ts '^edt^'}))";
New Window( "Query Date",
<<Modal,
sd = Today();
ed = Today();
H List Box(
Text Box( "From:" ),
scal = Number Edit Box( sd, <<Set Format( Format( "yyyy-mm-dd" ) ), <<SetFunction( Function( {this}, sd = scal << Get ) ), <<Set Show Spin Box(1) ),
Spacer Box( Size( 20, 20 ) ),
Text Box( "To:" ),
ecal = Number Edit Box( ed, <<Set Format( Format( "yyyy-mm-dd" ) ), <<SetFunction( Function( {this}, ed = ecal << Get ) ), <<Set Show Spin Box(1) ),
);
);
sdt = Munger( Format Date( sd, "yyyy-mm-ddThh:mm:ss" ), 1, "T", " " );
edt = Munger( Format Date( ed, "yyyy-mm-ddThh:mm:ss" ), 1, "T", " " );
Show( sdt, edt );
qstring = Eval Insert( tmpstr );
Show( qstring ); //see log