|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Can't find the eval-funcsHi folks,
I've got a database-field, type = input and eval = date. The value is entered as date but stored as timestamp. Is it right that the eval-function "date" converts the timestamp to a readable date to be displayed in the input-field and back to a timestamp to be stored in the database? I want to change the date-format in the input-field from dd-mm-yyyy to d.m.yy and I got the feeling that this eval-function would be a good point to start with. Where are this eval-functions located at? Any other ideas, how to change the date-format in the input-fields? Regards, Felix PS: I got the normal date-output (e. g. list view) formated allready by configuring localconf.php but somehow the date in the input-fields is not affected. PSS: Everytime I talk about input-fields in here I think of the input-fields in a backend TCEform. _______________________________________________ TYPO3-dev mailing list TYPO3-dev@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev |
|
|
Re: Can't find the eval-funcsHi,
Felix Oertel schrieb: > Is it right that the eval-function "date" converts the timestamp to a > readable date to be displayed in the input-field and back to a timestamp > to be stored in the database? Yes, exactly. > I want to change the date-format in the input-field from dd-mm-yyyy to > d.m.yy and I got the feeling that this eval-function would be a good > point to start with. > > Where are this eval-functions located at? Any other ideas, how to change > the date-format in the input-fields? The date formats currently are hardcoded. Oliver _______________________________________________ TYPO3-dev mailing list TYPO3-dev@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev |
|
|
Re: Can't find the eval-funcsHi,
Oliver Klee schrieb: >> Where are this eval-functions located at? Any other ideas, how to change >> the date-format in the input-fields? > > The date formats currently are hardcoded. Are t3lib/jsfunc.evalfield.js and t3lib/class.t3lib_tceforms.php good places to start at? :-) Regards, Felix _______________________________________________ TYPO3-dev mailing list TYPO3-dev@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev |
|
|
Re: Can't find the eval-funcsI can't find the global date()-function, too. But there is a function
called "formatValue" in *tceforms.php. To call this function your field need some extra settings. You can set them in a ext_tables.php in an extension like this: $TCA['tt_content']['columns']['date']['config']['readOnly'] = true; $TCA['tt_content']['columns']['date']['config']['format'] = 'date'; $TCA['tt_content']['columns']['date']['config']['format.']['option'] = 'd.m.Y'; To allow the "option" setting you have to comment out Line 3194 in *tceforms.php: //$TSconfig = t3lib_div::removeDotsFromTS($TSconfig); In my opinion there is a mistake with this function. Here is the current Bug: http://bugs.typo3.org/view.php?id=12148 But I don't know if there are any other problems in deactivating this. I'm not in the core team...it was only a hint for you to show your fields in given format. As Oliver told you: It's hardcoded and in my opinion there is no good possibility to save your value in the given format d.m.Y. Stefan Am 08.10.2009 12:13, schrieb Felix Oertel: > Hi, > > Oliver Klee schrieb: >>> Where are this eval-functions located at? Any other ideas, how to change >>> the date-format in the input-fields? >> >> The date formats currently are hardcoded. > > Are t3lib/jsfunc.evalfield.js and t3lib/class.t3lib_tceforms.php good > places to start at? :-) > > Regards, Felix _______________________________________________ TYPO3-dev mailing list TYPO3-dev@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev |
|
|
Re: Can't find the eval-funcsOliver Klee schrieb:
> > The date formats currently are hardcoded. > They are hardcoded for display in BE input field (TCEforms). But usually you can instruct your editors to use a specific format. Or is this a problem for your application. In the Install-Tool you can change the date format of BE input field from European (dd-mm-yyyy) to American date format (mm-dd-yyyy) using configuration option "USdateFormat]" I do not really know why it is so important for you to have your custom format in the BE. In the FE website, you can of course output any format you like using stdWrap's "date" function. greets, Bernhard _______________________________________________ TYPO3-dev mailing list TYPO3-dev@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev |
|
|
Re: Can't find the eval-funcsHi,
atm it's not possible to use custom date format for tceforms and eval. There is only the "USmode" feature. As we now use ExtJS and have a new date.format function it will be configurable in 4.4 vg Steffen _______________________________________________ TYPO3-dev mailing list TYPO3-dev@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev |
| Free embeddable forum powered by Nabble | Forum Help |