Jump to:

1132 Posts in 1966 Topics by 403 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Upgrading to 2.4: Validation error on DateField

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1728 Views
  • Mischa
    Avatar
    Community Member
    5 Posts

    Upgrading to 2.4: Validation error on DateField Link to this post

    Hi Everyone

    I've upgraded to 2.4.0 and got a validation error on DateField types (screenshot attached).

    Code:

    static $db = array(
    ...
    'Attention' => "Enum('Normal,High', 'Normal')",
    'StartDate' => 'Date',
    'EndDate' => 'Date',
    'PPPNr' => 'Text',
    ...
    );

    function getCMSFields() {
    $fields = parent::getCMSFields();
    $dateField = new DateField('StartDate', 'Start date');
    $dateField->setConfig('showcalendar', true);
    $fields->addFieldToTab('Root.Content.ProjectData', $dateField);
    ...

    The values in the input fields were placed by the date selection tool. Only values in the Format "May, 5 2010" are working. JavaScript request was 200 OK:
    ...
    validationError('EndDate', 'Please enter a valid time format.', 'validation');
    StatusMessage('Validation failed', 'bad');Behaviour.addLoader(hideLoading);
    ...

    Does anybody has a solution?

    Thanks for your help.

    Attached Files
  • Mischa
    Avatar
    Community Member
    5 Posts
    1728 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.