| Issue 2251: | Using moment.format() when appending start and end parameters does not work well when a language is set | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I am experiencing this with 2.1.0 beta 3. I _fetchEventSource, lines 1646 and 1467, there are calls to format on a moment object with no parameters. This causes moment to return the localized string for the date when a language is set. The format call should be hardcoded with YYYY-MM-DD.
Aug 22, 2014
Project Member
#1
adamrs...@gmail.com
Status:
Invalid
Aug 22, 2014
Here is what I am seeing when changing the language to Arabic:
/calendar/220?start=%D9%A2%D9%A0%D9%A1…%A6&end=%D9%A2%D9%A0%D9%A1%D9%A4-%D9%A0%D9%A9-%D9%A0%D9%A6&_=1408764981044
Logging rangeStart.format() produces some non ascii text.
I fixed it by doing:
if (startParam) {
var previousLocale = rangeStart.locale();
rangeStart.locale("en");
data[startParam] = rangeStart.format('YYYY-MM-DD');
rangeStart.locale(previousLocale);
}
if (endParam) {
var previousLocale = rangeEnd.locale();
rangeEnd.locale("en");
data[endParam] = rangeEnd.format('YYYY-MM-DD');
rangeEnd.locale(previousLocale);
}
Here is a jsfiddle: http://jsfiddle.net/on4cs7o8/
Aug 22, 2014
(No comment was entered for this change.)
Status:
Reproducing
Labels: Type-Bug
Aug 21, 2015
Discussion for this issue has moved to the following URL: https://github.com/fullcalendar/fullcalendar/issues/2516 This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event. Happy coding, Adam
Status:
ExportedToGithub
|
|
| ► Sign in to add a comment |