This question about Configuration: Answered

How to change default format to %Y-%m-%d


when using JsCalendarContrib together with the EditTablePlugin, one can add rows and have them one of the nifty calendar thingies. We use the default ISO format and the code is able to "parse" the date value, but will always overwrite the field with '%e %b %Y' instead of '%Y-%m-%d'. I set
$Foswiki::cfg{JSCalendarContrib}{format} = '%Y-%m-%d';
in LocalSite.cfg but this doesn't seem to do anything ...

We are using tables like this
   | *Date* | *Comment* | 

-- UlrichSpoerlein - 04 Apr 2009

Syntax for date in edittable is in Use raw view to see this example.

DateSorted descending Comment
changed value
default value

-- EnriqueCadalso - 05 Apr 2009

JSCalendarContrib affects how the date is used in forms. But you also need to set the format that appears in configure:

$Foswiki::cfg{DefaultDateFormat} = $year-$mo-$day';

-- SeanMorgan - 06 Apr 2009

Hi, I was using the correct syntax foe EDITTABLE and also had the DefaultDateFormat set in Localsite.cfg. I can no longer reproduce the effect though, perhaps JSQuery was to blame (which I deactivated recently, due to other bad influences).

I wish the whole Javascript support in Foswiki would be redone and cleaned up.

Thanks anyway

-- UlrichSpoerlein - 12 Apr 2009

QuestionForm edit

Subject Configuration
Extension JSCalendarContrib
Status Answered
Topic revision: r5 - 12 Apr 2009, UlrichSpoerlein - This page was cached on 20 Mar 2019 - 10:24.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy