Extjs datefield显示String类型日期

利用extjs 定义一个datefield:

{
	xtype : 'datefield',
	fieldLabel : '生存期',
	name : 'deadline',
	format : 'Y-m-d',
	invalidText : '日期不正确,请输入\'YYYY-MM-dd\'格式',
	minValue : new Date(),
	minText : '请选择今天之后的日期'
}
后台form中对应String deadline; 当从数据库中读取表单并显示到前台页面时发现
datefield栏无法显示。需将后台的日期转换为前台指定格式的字符串(例子中为y-m-d格式)。
如:日期:06/27/2011 02:03:23转换为2011-06-27即可。
This entry was posted in Computer, Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s