This question about Configuration: Answered

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

Hi,

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 http://foswiki.org/Extensions/JSCalendarContrib. Use raw view to see this example.

DateSorted descending Comment
2009-Apr-08
changed value
edit
2009-04-05
default value
edit

-- 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
Version
Status Answered
Topic revision: r5 - 12 Apr 2009, UlrichSpoerlein
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