brunobasto/liferay-portal — pull request #102 by peterborkuti (2014-06-05 08:47:02+00:00)
Title: LPS-47324 search portlet Search button disabled when selecting date range in IE8

Hi @brunobasto,

This pull was tested by @vilmospapp. I have seen, that you had reviewed similar modifications (see https://github.com/brunobasto/liferay-portal/pull/100), so I decided to sent you this pull request.

Some remarks:

The root cause is that in IE8 new Date("2014-06-05") gives NaN.
I think, that the true fix would be fixing YUI (becase we falls back to YUI), but that would be far more complicated.

Alloy fallbacks YUI, see here:
https://github.com/liferay/alloy-ui/blob/master/src/aui-datatype/js/aui-datatype-date-parse.js, line 832:
"If only one argument is passed, the YUI parser will be called for backwards compatibility."

Here in YUI:
https://github.com/yui/yui3/blob/master/src/date/js/date-parse.js
"var val = new Date(+data || data);"
So it is too simple to fix this IE8 issue.

And I also think, that we should use a localized format of the date, but it is rather a feature and our customer
did not complained about the format of the date. If you agree with me about the localized date string, I will happy to code it, however, we should fix this issue first because of our deadlines.

Thank you in advance
Péter