Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date format from geoserver #19

Open
Kulikovpavel opened this issue Oct 21, 2015 · 1 comment
Open

Date format from geoserver #19

Kulikovpavel opened this issue Oct 21, 2015 · 1 comment

Comments

@Kulikovpavel
Copy link

Date, that returned from Geoserver, contains "Z" on end of string, "2015-10-15Z".

  types: ['date', 'time', 'datetime'],
      parse: function (input) {
        return new Date(input);
      }

In Chrome this work good, but in IE11-12, browser cant parse that (invalid date), need to remove "Z".

something like this

if (input[input.length-1] == "Z") {input = input.substring(0, input.length - 1)};
return new Date(input);

Dont sure, is this correct

@kuzkok
Copy link
Member

kuzkok commented Oct 21, 2015

msdn says that IE can parse this dates, but in examples its presents with time...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants