一般动作
登录
Wiki: BROPEN ▼: Document Index
»
Space: AppWithinMinutes ▼: Document Index
»
Page: Date
搜索
default
页面动作
导出 ▼: 以PDF格式导出 以RTF格式导出 以HTML格式导出
更多动作 ▼: 打印预览 察看源码
欢迎进入Wiki » App Within Minutes » FormField Class » Date

# Wiki源代码Date

在2013-10-01 11:53上被Administrator修改
评论 (0) · 附件 (0) · 记录 · 信息
隐藏行号 1: {{velocity}} 2: {{html clean="false"}} 3: ## 4: ## This is a custom displayer used by Date properties. Since 4.3M2 this is the default Date displayer so there is no 5: ## need to use it on new Date properties. We have to keep it because there may be old Date properties that are still using it. 6: ## 7: #set($field = $object.getxWikiClass().get($name)) 8: #set($format = $field.getProperty('dateFormat').value) 9: #set($formattedValue = $escapetool.xml($datetool.format($format, $value))) 10: #if($type == 'edit') 11: ## A simple date picker widget. 12: #set($discard = $xwiki.ssfx.use('uicomponents/widgets/datepicker/calendarDateSelect.css', true)) 13: #set($discard = $xwiki.jsfx.use('uicomponents/widgets/datepicker/calendarDateSelect.js', true)) 14: ## Used to parse and serialize the selected date using the date format specified in the XClass. 15: #set($discard = $xwiki.jsfx.use('uicomponents/widgets/datepicker/simpleDateFormat.js', true)) 16: ## A wrapper over the CalendarDateSelect widget that uses the SimpleDateFormat to parse/serialize the dates. 17: #set($discard = $xwiki.jsfx.use('uicomponents/widgets/datepicker/dateTimePicker.js')) 18: #set($id = $escapetool.xml("${prefix}${name}")) 19: <input type="text" id="$!id" name="$!id" class="datetime t$!value.time" value="$!formattedValue" title="$!escapetool.xml($format)"/> 20: #else 21: $!formattedValue 22: #end 23: {{/html}} 24: {{/velocity}}

# 快速链接

- 首页
- 新闻动态
- FAQ

Copyright © 2013 北京博瑞开源软件有限公司
京ICP备12048974号