21288 Posts in 5733 Topics by 2602 members
| Go to End | ||
| Author | Topic: | 3631 Views |
-
Re: DateTimeField, Invalid time format

3 June 2010 at 10:23pm
Could you add a "TimeZone" dropdown next to the field. By default it would be filled in with one (say, us/uk etc), but then it could be changed?
Alternatively, you could maybe have a static in the DatetimeField class, something like:
DatetimeField::$timezone = "dd/mm/yyyy";
Just some thoughts?
Mo
-
Re: DateTimeField, Invalid time format

4 June 2010 at 9:00am
Timezone support would be great, although we'd have to investigate how its storage works across databases.
Tom has done some timezone extensions to the CMS, incl. a TZDateTimeField: http://open.silverstripe.org/browser/modules/timezoneawareness/trunk - its pre 2.4 stable, not sure how useful it still is.Do you guys still see this as part of the DateField codebase? I want to avoid ending up with a huge bloated class (think HasManyComplexTableField), any suggestions on how to apply this cleanly in terms of design patterns?
Zend_Date already has good timezone conversion support, so making this a presentational setting (and storing the date without timezone) might be a lot simpler.
By the way, I've added a patch to the datepicker ticket mentioned before - it works with jQuery UI now, wohoo
Still looking for feedback and code review: http://open.silverstripe.org/ticket/5397 -
Re: DateTimeField, Invalid time format

1 September 2010 at 10:52pm
Do you get this working if you empty browser cache completely?
My calendar dosnt popup when i go to date field in cms. If i refresh browser then its ok, and after that it load ok.Same thing happens with Dataobjectmanager module. First load dosnt seem to load correctly like something were missing, but after refreshing all ok.
My code looks like this.
class MyPage extends Page {
static $db = array (
'MyPageName' => 'Text',
'From' => 'Date',
'To' => 'Date'
}public function getCMSFields() {
$f = parent::getCMSFields();// add fields
$datefieldFrom = new DateField('From','From');
$datefieldTo = new DateField('To','To');
$datefieldFrom->setConfig('showcalendar', true);
$datefieldTo->setConfig('showcalendar', true);$f->addFieldToTab("Root.Content.Main", $datefieldFrom);
$f->addFieldToTab("Root.Content.Main", $datefieldTo);return $f;
}
}I been banging my head against wall with this one pretty long....
-
Re: DateTimeField, Invalid time format

3 September 2010 at 8:30am
Which browser are you using? I've copypasted your code into a fresh branches/2.4 installation, and the calendar shows up fine when clicking into the field (both for ajax load and when the form appears directly on a subsequent browser refresh). I don't think browser cache should have anything to do with it, but I've disable cache completely during testing just to be sure.
-
Re: DateTimeField, Invalid time format

9 September 2010 at 5:10am
thx for response...
Its not browser issue does same with all browers. IE, FF, Chrome.
And funny thing in this is that this works fine on my local wamp server but not on my customers lamp server.I did some test without Datefield cause i noticed that dataobject manager module does behave similary. After first load it just dosnt show as it should be (clean mac like title bar with text displaying 0 to 0 of 0)... AND when i try to add new Dataobject it goes to URL in main browser window while popup should appear.
BUT everything ok after refreshing admin site.
Tryed this with clean installation with silverstripe 2.4.1 and dataobject_manager 414.This is realy weird stuff. Any idea everyone what could tie silverstripe, javascript and server together.
| 3631 Views | ||
| Go to Top |



