从 yy 到 yyyy 的日期字段 xtype 选择
datefield xtype selection from yy to yyyy
我正在使用小部件文本字段,当我 select 日期时,它以 mm/dd/yy 格式填充,但我想要 mm/dd/yyyy。有没有人对可以实现的对话级别的任何配置有任何想法。这是我的 dialog.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Dialog"
title="dialog"
xtype="dialog">
<items
jcr:primaryType="cq:Widget"
xtype="tabpanel">
<items jcr:primaryType="cq:WidgetCollection">
<tab1
jcr:primaryType="cq:Panel"
title="printcoverage">
<items jcr:primaryType="cq:WidgetCollection">
<articleDate
jcr:primaryType="cq:Widget"
fieldLabel="Publication Date"
name="./publicationdate"
xtype="datefield"/>
</items>
</tab1>
</items>
</items>
</jcr:root>
你可以给它添加格式配置。试试这个
<articleDate
jcr:primaryType="cq:Widget"
fieldLabel="Publication Date"
name="./publicationdate"
format="m/d/Y"
xtype="datefield"/>
格式配置 y = yy 和 Y = yyyyy。可以在此处找到配置选项的完整列表 -> http://docs.sencha.com/touch/1.1.1/#!/api/Date
我正在使用小部件文本字段,当我 select 日期时,它以 mm/dd/yy 格式填充,但我想要 mm/dd/yyyy。有没有人对可以实现的对话级别的任何配置有任何想法。这是我的 dialog.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Dialog"
title="dialog"
xtype="dialog">
<items
jcr:primaryType="cq:Widget"
xtype="tabpanel">
<items jcr:primaryType="cq:WidgetCollection">
<tab1
jcr:primaryType="cq:Panel"
title="printcoverage">
<items jcr:primaryType="cq:WidgetCollection">
<articleDate
jcr:primaryType="cq:Widget"
fieldLabel="Publication Date"
name="./publicationdate"
xtype="datefield"/>
</items>
</tab1>
</items>
</items>
</jcr:root>
你可以给它添加格式配置。试试这个
<articleDate
jcr:primaryType="cq:Widget"
fieldLabel="Publication Date"
name="./publicationdate"
format="m/d/Y"
xtype="datefield"/>
格式配置 y = yy 和 Y = yyyyy。可以在此处找到配置选项的完整列表 -> http://docs.sencha.com/touch/1.1.1/#!/api/Date