Allgemeine Aktionen:
Anmelden
Registrieren
Start ▼: Wiki Verzeichnis
»
Bereich: AppWithinMinutes
»
Seite: Date
default
Aktionen:
Exportieren ▼: Als PDF exportieren Als RTF exportieren Als HTML exportieren
Weitere Aktionen ▼: Druckvorschau Zeige den Quellcode
Willkommen bei bytebang » Anwendung erstellen in wenigen Minuten » FormField Class » Datum

# Wiki-Quellcode von Datum

Zuletzt geändert von Administrator am 2014/06/29 19:29
Zeilennummern verstecken 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}}

(c) 2025, by bytebang e.U. - Impressum - Datenschutz / Nutzungsbedingungen
-