Datums 
espaan
/ Feb 07, 2012 / 07:56 ![]()
![]()
Hi,
ich mache es am English...
I have my Module online, but when editing entities with a date field the dates don't show up ok.
When the entities are shown in a list (http://http://a…nl/wedstrijden ) the dates are fine and reflect the current dates as in teh database. But when I try to edit the entity (wedstrijd in this case) the dates get messed up in the online mulit-lang dutch install. For example 3 March 2012 becomes the current today date instead of 3 march.
So local install (only en)
showing in view Sat 03-Mar-2012
Editing shows: Saturday, March 03, 2012
Online install (multi lang)
showing in view Sat 03-Mar-2012
Editing shows: Dinsdag 07 februari 2012, which is todays date.
Does it have to do with translated dateformats?
----
Other date question. I have some dates a 0000-00-00, so infact sort of null, but when I edit the entity with this date it gets
filled in to the current Today date, while it should in fact stay more or less null as not filled in. Where can I change this kind of behaivour?
regards,
Erik
Options
Rating
Replies
-
espaan / Feb 07, 2012 / 08:08


Hi, I have already found some clues. Had to look a little further is what was happening and the 2nd part seems just
to be in templates/admin/wedstrijd/edit.tpl
But the 1stpart with the messed up date seems releated to formdateinput.
Axel / Feb 07, 2012 / 08:20


Hi Erik,
in the edit.tpl template you might find something like defaultValue=today for the creation mode. This could be related to your second problem. However note that only zeros could be an invalid value for DateTime objects.
About the wrong display please check if this the problem persists if you use the English language. If not then maybe something is wrong in /locale/nl/locale.ini? In general it seems to work fine with German date formats.
espaan / Feb 07, 2012 / 08:35


Hi, thanks. Was already playing a little with the inputs in edit.tpl (was a bit too soon with posting here in hindsight
). Yes I didnt think of that 2nd point when entering the field inthe Model. It can be empty and then it's not a valid date indeed. Have to thinks what is the easiest.
espaan / Feb 08, 2012 / 09:59


Hi I've set the formdateinput to useSelectionMode=false and that works for english and dutch. However trying to edit english works fine, but editing dutch gives issues. Then I get when pressing on Cancel:
DateTime::__construct() [datetime.--construct]: Failed to parse time string (Zaterdag 03 maart 2012) at position 0 (Z): The timezone could not be found in the database,
The string which is used in the Dateinput %A, %B %d, %Y is translated in the dutch zikula.po file. Might that be the issue?
How to set up relations
- 8 Replies
- Axel on May 15, 2012 - 06:04
Neue Umfragen
You have not voted in the poll:
Did you test ModuleStudio 0.5 already?
