I noticed the dates on the igGrid were showing the US date format (MM/DD/YYYY) instead of the UK date format (DD/MM/YYYY). I tried to set the regional value in the loader to 'en-GB' as follows:
$.ig.loader({ scriptPath: 'ig_res/igniteUI/js/', cssPath: 'ig_res/igniteUI/css/', regional: 'en-GB', resources: 'igGrid.*,igShared,igEditors,igValidator,extensions/infragistics.ui.editors.knockout-extensions.js,extensions/infragistics.datasource.knockoutjs.js,extensions/infragistics.ui.grid.knockout-extensions.js',
But I get the following error every time on load:
0x800a138f - JavaScript runtime error: Unable to get property 'extend' of undefined or null reference
If I remove the regional override, then the exception doesn't appear. Also, if I use the autoDetectLocale property and set it to true, then the dates are still in the wrong format, despite my machine being set to the en-GB culture.
Hello William,
Thank you for posting in our community.
We are currently reviewing your scenario. I will get back to you within a couple of days with detailed information or possible solutions for the issue.
Any update?
hey Bill,
If you put "igDataSource," in front of "igGrid.*" it will work fine, like that:
resources: 'igDataSource,igGrid.*,igShared,igEditors,igValidator,extensions/infragistics.ui.editors.knockout-extensions.js,extensions/infragistics.datasource.knockoutjs.js,extensions/infragistics.ui.grid.knockout-extensions.js'});
Hope it helps. Thank you
Angel
ok, great. Please let me know if you need any additional feedback on this.
Thanks
I fixed the issue by physically changing the JSON date into a Date (new Date(date)) before adding it to the grid.
I've created some sample code, for your reference. Using this sample code, it seems to work fine - the added data in the grid is using the GB locale. By the way, it may well be that our builds of the javascript differ, so in your case - if it's an older build - there was some pending issue that our development fixed. If you can let me know the build number your using, I can check if I can reproduce the issue with the same build.
I am attaching the sample code. Thanks,
As I said, I'm using Knockout JS. Push a row into the datasource (an observable array) and the formatting will be incorrect.
I don't know why the image isn't appearing. If I edit my post I can see the picture, but it isn't appearing here. Looks like an issue with your forum software.
I don't see the image above - it appears as broken, could you check? I've added a row using row Adding (from the UI) - and it appeared formatted correctly, following the en-GB locale.
Thank you