Priority: Urgent
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)
--
SvenDowideit - 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.
--
OlivierRaginel - 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.
--
OlivierRaginel - 30 Mar 2012