First, it has only one date, but no time, so here is the end of the year, month, and day.
For example:
CopyCode The Code is as follows: <mx: datefield id = "dfdapplytime" stylename = "formitemcss" formatstring = "YYYY-MM-DD"
Daynames = "[Day, one, two, three, four, five, six]"
Monthnames = "[January, February, March, April, May, June, July, August, September, October]"
Editable = "false"
/>
at this time, you can process the display format as needed, such as DD/MM/YYYY. note that there is no such thing as hh: NN: SS, but it can be used for processing.
This is why I feel depressed.
however, I can solve the problem by adding a few more boxes, but it is troublesome. see copy the Code as follows:
selecteddate = "{new date ()} "
formatstring =" YYYY-MM-DD "
daynames =" [Day, one, two, three, four, five, six] "
monthnames =" [January, february, March, April, May, June, July, August, September, October, November, December] "/>
Second, you can do the same. If you want to initialize the time interval, you can do the same. Here we also provide the time processing method. That is, dateformatter can use it to format the time. For example:Copy codeThe Code is as follows: var et: Date = new date ();
VaR N: Number = 1000*60*60*24*30;
VaR ST: Date = new date (ET. Time + n );
VaR DF: dateformatter = new dateformatter ();
DF. formatstring = 'yyyy/MM/dd hh: NN: ss ';
VaR ST1: String = DF. format (ST );
Alert. Show (ST1 );
You can also use controls to achieve the same effect. These functions can be used to meet the requirements. However, if there is no time, minutes and seconds, it is really difficult to use them. I hope to write a control next time for processing.