Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
985
How to format to dateTime datatype to current locale in igGrid
posted

I would like to display date in locale date format, how do I do it? I tried using format, but it doesn't work? is there easy way to do it?

        $("#grid1").igGrid({

            autoGenerateColumns: false,

            columns: [

                { headerText: "ID", key: "ID", dataType: "number" },

                { headerText: "Name", key: "Name", dataType: "string" },

                { headerText: "DOB", key: "DOB", dataType: "dateTime" },

            ],

            dataSource: adventureWorks,

            responseDataKey: 'Records',

        });

Json:

            adventureWorks = [{"ID":1,"Name":"Jack","DOB":"1970/10/12"},{"ID":2,"Name":"Harry","DOB":"1995/7/12"},{"ID":1,"Name":"Pat","DOB":"1955/1/9"}];