21495 Posts in 5784 Topics by 2622 members
| Go to End | ||
| Author | Topic: | 1491 Views |
-
Re: DateTime/datepicker format problems

17 March 2012 at 12:33am
That obviously suggests that it's a problem specific to the beta, but I couldn't find anything to suggest that the DateField class has been altered at all.
Is the beta using a different version of JQuery or anything? I'm starting to think that it might be a javascript issue
-
Re: DateTime/datepicker format problems

17 March 2012 at 11:39pm
I've not started to use SS3 yet, your best bet is to ask on the dev list..
https://groups.google.com/forum/?fromgroups#!forum/silverstripe-dev
or raise a bug on...
-
Re: DateTime/datepicker format problems

19 March 2012 at 4:18am
SilverStripe v2.4
Need to change the date formatting mask. This solution is for many languages.
1. Open file "sappire\core\model\fieldtypes\Date.php"
2. Replace function "date" and formatting mask with strftime function (see more http://www.php.net/manual/en/function.strftime.php)
3. Open your "_config.php" file and add this string: setlocale(LC_TIME,''); or setlocale(LC_TIME, 'your_LOCAL'); -
Re: DateTime/datepicker format problems

3 July 2012 at 12:31am
Hi,
I ran into this issue using version 3.0.0 stable, so I thought I'd share. Example: Dutch locale (nl):first you set something like this in your getCMSFields()
...
$fields->addFieldToTab('Root.MyTab', $date = new DateField('Date', 'MyDate'));
...
$date->setConfig('showcalendar', true);
$date->setConfig('jslocale', 'nl');
$date->setConfig('dateformat','dd-MM-yyyy');Next you need to have a regional file be present for the desired language. At the moment these are not (yet) included in the SilverStripe distribution. Get them here: http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/
SilverStripe expects this file to live in /framework/thirdparty/jquery-ui/minified/i18n/jquery.ui.datepicker-nl.min.js (note the .min in the name)
Ticket here: http://open.silverstripe.org/ticket/7610
Martine
-
Re: DateTime/datepicker format problems

6 July 2012 at 5:43pm
Is it possible to show the datepicker in my gridfield?
I use it in my eventgrid and when i add new entry and jumping to the input mask picker is not working.
Some ideas how to solve this problem? -
Re: DateTime/datepicker format problems

18 October 2012 at 3:04pm
Hi,
I just had similar issues - wrong date format swapping dates and months....
you have to turn set the datefeild config to show, and to use dd-MM-yyyy<?php
class Event extends DataObject {
public static $db = array(
'Title' => 'Varchar',
'Date' => 'Date',
'Details' => 'HTMLText',
);public function getCMSFields() {
DateField::set_default_config('showcalendar', true);
DateField::set_default_config('dateformat','dd-MM-yyyy');
$fields = parent::getCMSFields();
$fields->removeFieldFromTab("Root.Main","EventPageID");
return $fields;
} -
Re: DateTime/datepicker format problems

19 October 2012 at 2:20pm
My issue isn't the exact same, but it is an issue with the calendar picker.
If the calendar picker field is required, I'm finding when I pick the date with the jquery calendar, it fills the field in fine, but when I go to submit the form the JS validation says that the form is required and needs to be filled out.
Has anybody experienced this before? I've had clients tell me the same and I can replicate it.
I'm just using the userforms module, and setting the date in my config file as i18n::set_date_format('dd/MM/YYYY');
| 1491 Views | ||
| Go to Top |






