User Tools

Site Tools


Plugin installed incorrectly. Rename plugin directory 'swiftmail.backup' to 'swiftmail'.
en:projekt:jsfundgrube:datepicker_format

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:projekt:jsfundgrube:datepicker_format [2018/01/11 08:25]
Julian Le created
en:projekt:jsfundgrube:datepicker_format [2021/07/01 09:52] (current)
Line 1: Line 1:
-FIXME **This page is not fully translated, yet. Please help completing ​the translation.** \\ +<note tip>The entry about the datepicker can be found [[en:​software:​tim:​smartform_basics#​datepicker_calender|here]].</note>
-//(remove this paragraph once the translation is finished)//+
  
-<note tip>Den Eintrag über den [[:​software:​tim:​smartform_basics#​datepicker_kalender|Datepicker]] kann [[:​software:​tim:​smartform_basics#​datepicker_kalender|hier]] gefunden werden.</​note>​+======Changing the date's format in the datepicker======
  
-====== Datumsformat im Datepicker ändern ======+With this javascript function you can change the date's format in your own datepicker
  
-Mit dieser Javascript Funktion kann mit eigenen Datepickern das Format des Datums geändert werden+  * e.g. 01.01.2017 
 +  * e.g. 01-01-2017
  
-  * z.B01.01.2013 +This is the format, which is used, when storing the values in the TIM databaseThis way you get a pretty format for [[en:​software:​tim:​actionhandler:​wordtemplatehandler|WordTemplates]],​ [[en:​software:​tim:​mailnode|Mailnodes] etc.
-  * z.B. 01-01-2013+
  
-Dass ist das Format ​in dem die Werte anschließend in die T!M Datenbank geschrieben werdenSo erhält man eine schöne formatierung für [[:​software:​tim:​actionhandler:​wordtemplatehandler|WordTemplates]][[:​software:​tim:​mailnode|Mailnodes]] etc.+Therefor a new datepicker has to be implemented ​in the custom.jswhich overrides the one in TIM.
  
-Hierfür muss ein neuer Datepicker in der Custom.js angelegt werden, welcher die T!M eigene überschreibt. +In the [[en:​software:​tim:​smartform|Smartform]] ​we needlike with the normal datepickerinput field with a class. In this example the class **datefield** is used.
- +
-In der [[:​software:​tim:​smartform|Smartform]] ​brauchen wir hierwie auch beim normalen DatepickerInputfelder mit einer Klasse. In meinem Beispiel hier habe ich die Klasse ​datefield ​gewählt.+
  
 <​code>​ <​code>​
 <form initMethod="​initMyDateField">​ <form initMethod="​initMyDateField">​
-<input type="​text"​ name="​myDateField"​ id="​myDateField"​ class="​datefield"/> ​Datum+<input type="​text"​ name="​myDateField"​ id="​myDateField"​ class="​datefield"/> ​Date
 </​form>​ </​form>​
 </​code>​ </​code>​
  
-jQuery ​wird hier benötigt und muss eingebunden werden!+jQuery ​is required here and must be imported!
  
 <​code>​ <​code>​
Line 29: Line 26:
 </​code>​ </​code>​
  
-In der Customdatei wird nun in der initMyDateField (frei wählbarder Datepicker initialisiert.+In the custom file the datepicker is now being initialized ​in the function ​initMyDateField (name is freely selectable)
  
 <​code>​ <​code>​
Line 38: Line 35:
 </​code>​ </​code>​
  
-Dem Datepicker können verschiedene regionale Formatierungen mitgegeben werden. In diesem Beispiel ​"​de"​ was dann zu folgendem führt: 31.07.2013+The datepicker can be given different regional formats. In this example ​"​de"​ was given, which leads to: 31.07.2013
  
-Es sind natürlich noch weitere Formatierungsarten möglichbishin zur Benennung der Wochentage und MonateHierfür lohnt sich ein Blick in die jQuery API für Datepicker ​([[http://​api.jqueryui.com/​datepicker/​|http://​api.jqueryui.com/​datepicker/​]]).+There are of course further formats availableall the way to naming the weekdays and monthsTherefor you can look in the jQuery API for datepicker 
 +([[http://​api.jqueryui.com/​datepicker/​|http://​api.jqueryui.com/​datepicker/​]]).
  
  
en/projekt/jsfundgrube/datepicker_format.1515655530.txt.gz · Last modified: 2021/07/01 09:54 (external edit)