Make a small button and click it. If the next small bullet box appears, you can select the date and time source code [javascript] varavg_fdate & quot;, avg_tdate & quot;, selperiodconsole. constants. HRS12, fdate & quot;, tdate & quot; va
Make a small button and click it, as shown in the next small bullet box.
Date and time can be selected
Source code
[Javascript]
Var avg_fdate = "", avg_tdate = "", selperiod = console. constants. HRS12, fdate = "", tdate = "";
Var avg_button = new Ext. Button ({
Icon: '/ico/date.png ',
Cls: 'x-btn-icon ',
Tooltip :{
Text :_('Select time range
')
},
Handler: function (){
Var avg = new CustomPeriodUI (_ ("Select time range"), fdate, tdate, selperiod );
Var avg_window = avg. getWindow ();
Var btn = new Ext. Button ({
Id: 'avg _ click ',
Text: _ ('OK '),
Listeners :{
Click: function (btn ){
If (avg. validate ()){
Avg_00000000hide (); www.2cto.com
Avg_fdate = avg. fromTime ();
Avg_tdate = avg. toTime ();
Fdate1 = formatDate (new Date (avg_fdate); // convert the Date Format
Tdate1 = formatDate (new Date (avg_tdate ));
}
}
}
});
Avg_00000000addbutton (btn );
Avg_00000000show ();
}
});
It's easy.