[TYPO3-core] RFC: #11648: Feature: Add datepicker to date and datetime fields in TCEFORMS

Benjamin Mack benni at typo3.org
Thu Aug 6 15:27:19 CEST 2009


Hey Steffen,

thanks for your patch! I'm glad that we can get in a datepicker that easily.

There are two things I noticed after reading & testing:

*  t3lib/js/tceforms.js

-> Please use namespaced classes and functions.
    I'd suggest T3.TCEforms.DatePicker with an initialize() function
-> Please put the CSS.createStyleSheet stuff in the t3skin extjs skin file.

* The Skinning issue that Ingo and Bastian mentioned. This solely comes 
from the reason that the extJS CSS-class is added. There are multiple 
ways to fix this:

  * Either add a custom (or a tceforms-datetime-...) class to the 
Ext.form.DateField constructor to overwrite the "x-form-text" classes. 
Do this by using the
     cls: 'tceforms-...',
or the
     ctCls: '...'
options, and recheck in the browsers Bastian mentioned.

* Or you could modify the CSS classes in the t3skin-ext skin to not add 
anything like that at all.

* Or you could add CSS classes to the container of that item and then 
overwrite the CSS classes through cascading through ".tceforms-container 
.x-form-text" or something like that.

* Or you could also modify the template inside Ext.form.DateField that 
builds the input field to make it consistent to the current look&feel.

As long as we don't have a full-blown-Ext-TCEforms, I'd recommend #1 or 
#3 or #4.

If you fix all the issues mentioned, you'll get my +1 after reading and 
testing, although I probably should read through the code again then.

As for Ingo's remark on the "oldskin", I'd say, we copy the 
t3skin/extjs-theme/ from t3skin to /typo3/gfx/ and use this as long as 
we have the oldskin in there, it doesn't look nice then (well, I can't 
believe somebody still uses oldskin) but will work.

All the best,
Benni.


More information about the TYPO3-team-core mailing list