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
140
Angular 4: igGrid editorType datepicker
posted

Hello,

I have a problem with the format of my dates.

In my gridOptions I use the column with format dd-MM-yyyy (I am from belguim):

{ key: "startDate", headerText: "startDate", width: "90px", dataType: "date", format: "dd-MM-yyyy" }

When I type in my date, everything is okay, but when I use the datepicker it uses the MM-dd-yyyy format. I know it has something to do with the regional settings of the datepicker but I haven't found a solution in the last 2 hours of my search.

I tried:

jQuery("#gridTopics>thead>tr>td:eq(5)>span").igEditor("option", "dateDisplayFormat", "dd-MM-yyyy");

jQuery("#gridTopics>thead>tr>td:eq(5)>span").igEditor("option", "dateInputFormat", "dd-MM-yyyy");

but I get an error that igEditor doesn't exist. I also tried to put this in the editoroptions with no luck:

{ columnKey: "startDate", editorType:"datepicker", required: true, editorOptions: { type: "date", disabled: false, dateDisplayFormat: "dd-MM-yyyy", dateInputFormat:"dd-MM-yyyy"} }

I also tried searching for a solution with the ig.loader but I couldn't find a clear example (but I think working with this would be the best solution?)

So if someone could point me in the right direction, it would be greatly appreciated!

Kind regards,

Robbe



Parents Reply Children