Search code examples
htmlfirefoxlightswitch-2013

Lightswitch HTML Client Date Data Display. Locale Aware in I.E. Not Locale Aware in FireFox


HTML Client with a row list containing date data.

I.E. is locale aware (en-NZ) and displays say 6/10/2014. for 6th October.

Firefox displays 10/6/2014.

Is there perhaps some HTML that I need to add to default.htm to force Firefox to use our locale. (The app is unlikely to move regions).

thanks


Solution

  • a simple fix if there aren't to many is this code:

    contentItem.dataBind("value", function (value) {
        if (value) {
            $(element).text(value.format("dd-MM-yyyy"));
        }
    });
    

    add it to the post render of the date and it forces the browser to display it in the correct format..