1、My97日期控件.显示不同的日期格式,可以调整"dateFmt“的参数来配置;
详细DEMO:http://www.my97.net/demo/index.htm
<p>日期: <input name="createtime" type="text" class="Wdate" onClick="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' })"></p>
2、JAVA的日期通过JSON转自前台显示时,默认是数值型的格式来展示的;在easy ui 的datagrid组件中,要在JS中加下转换函数,如下:
{field:'createtime',title:'生产日期',width:30,sortable:true,
formatter:function(value,row,index)
{
var createtime = new Date(value);
return createtime.toLocaleString();
//return row.createtime;
}
},