This question about Configuration: Asked

How Can I Customise Date Format In Search And Forms

This is really 2 questions, relating to date format.

1. I want to change the format of how the date appears in search results, eg from %SEARCH{ ....... format="$date ........."}%

This currently uses the format 25 Jan 2012 - 10:33 . I would like to remove the time element from the date to make it shorter, or possibly define a new format token for date without time. Where is this format defined and can I change it?

2. I want to change the format of the date as used in forms. If the formfield type is set as date you get a calendar to pick a date from , then it appears in the format 25 Jan 2012 However, this does not allow you to sort a column of date in a sensible way. If the date could appear as YYYY-MM-DD eg. 2012-01-25 then they can be easily sorted into chronological order. WHere is this date format defined and can I change it?

Thanks

Tamsin

-- TamsinTweddell - 25 Jan 2012

The date display format is system wide - defined in bin/configure Internationalization / Locale tab. And the date format saved into forms by JSCalendarContrib is set under the Extensions / JSCalendarContrib tab. {JSCalendarContrib}{format}

-- GeorgeClark - 26 Jan 2012

I have been revisiting this issue and the first point is not quite resolved. Looking at bin/configure Internationalization / Locale tab, the DefaultDateFormat is set to $day $month $year which is what I want. But I'm trying to get rid of the time element which appears from the $date element in %SEARCH{ ....... format="$date ........."}%. It doesn't seem possible to do this on that configure tab.

Do you have any further recommendation?

-- TamsinTweddell - 05 Jul 2012

 

QuestionForm edit

Subject Configuration
Extension JSCalendarContrib
Version Foswiki 1.1.3
Status Asked
Related Topics
Topic revision: r3 - 05 Jul 2012, TamsinTweddell
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