Item11701: JSCalendarContrib should fallback to numbers for month in case it is given a date like 1/12/2012 and format expects 1 Dec 2012.
Current State: Closed
Released In: 1.1.5
Target Release: patch
(sorry George, the title is for Olivier)
steps to show issue:
- goto http://foswiki.org/System/JSCalendarContrib#Displaying_the_calendar
- type '1/12/2012' into the text box
- click the calendar button
jscal has selected 12 jan 2012, which is not the same order as much of the world expects, is not the order in the cfg setting (which is day mon year, though with spaces) and more ironically, is different from twiki - where (i was told it was correct - but t.o just ignores the text entirely)
- 29 Mar 2012
It's a feature from Dyncalendar. We're telling it the date format is: %e %B %Y, so it's looking for a number, then a string, then another number, but we're passing it 3 numbers.
An easy fix is to hack the JS guessing the date to fallback to numbers in case %B doesn't match anything. It works, and I don't really like it, but I can't think of anything more clever to do.
Here we were then using the fallback mechanism, which is US-only. Hacking the fallback means some parts of the world won't be happy, so... committing this to trunk, feel free to comment / amend / revert.
- 29 Mar 2012
It seems my comment wasn't clear. Yes, I fixed it the right way, and it should work for anybody. I was just saying that it was finding the US date because it was using the fallback mechanism, and that if I were to hack the fallback mechanism to do the right thing, then the US people would be unhappy.
Thanks for merging, George.
- 30 Mar 2012