DateField Component to display in Dynamic textfield

I’ve seen different versions of this question but I can not find the specific answer I need to make this work.

Simply as I can put it, I drag a Datefield component on stage and then create a dynamic text field on stage. I’m looking for the actionscript to make the selected date from the DateField also appear in the dynamic textfield.

I’ve found the script to do this for a numeric stepper

var my_nstep:mx.controls.NumericStepper;

var nstepListener:Object = new Object();
nstepListener.change = function(evt_obj:Object){
myText.text =;
my_nstep.addEventListener(“change”, nstepListener);

I’ve tried modifying this script to work with the datefield but all I can get to happen is for the dynamic textfield to say “undefined.”

If anyone can give me the correct actionscript to make this work for the datefield, it would be most appreciated.