General Actions:
Log-in
Register
Home
▼
:
Wiki Index
»
Space:
AppWithinMinutes
»
Page:
Date
default
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to bytebang
»
App Within Minutes
»
FormField Class
»
Date
Wiki source code of
Date
Last modified by
Administrator
on 2014/06/29 19:29
Content
Show line numbers
{{velocity}} {{html clean="false"}} ## ## This is a custom displayer used by Date properties. Since 4.3M2 this is the default Date displayer so there is no ## 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. ## #set($field = $object.getxWikiClass().get($name)) #set($format = $field.getProperty('dateFormat').value) #set($formattedValue = $escapetool.xml($datetool.format($format, $value))) #if($type == 'edit') ## A simple date picker widget. #set($discard = $xwiki.ssfx.use('uicomponents/widgets/datepicker/calendarDateSelect.css', true)) #set($discard = $xwiki.jsfx.use('uicomponents/widgets/datepicker/calendarDateSelect.js', true)) ## Used to parse and serialize the selected date using the date format specified in the XClass. #set($discard = $xwiki.jsfx.use('uicomponents/widgets/datepicker/simpleDateFormat.js', true)) ## A wrapper over the CalendarDateSelect widget that uses the SimpleDateFormat to parse/serialize the dates. #set($discard = $xwiki.jsfx.use('uicomponents/widgets/datepicker/dateTimePicker.js')) #set($id = $escapetool.xml("${prefix}${name}")) <input type="text" id="$!id" name="$!id" class="datetime t$!value.time" value="$!formattedValue" title="$!escapetool.xml($format)"/> #else $!formattedValue #end {{/html}} {{/velocity}}