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
Hello Robbe,
Thank you for contacting Infragistics!
I have done some looking into this matter and so far I have been unable to reproduce this behavior. I have some follow up questions,
What version are you using?What scripts are you including?How are you setting up the loader?
Looking forward to hearing from you,
Hello Mike P,
Version is:
Included scripts are:
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/jquery-ui-bundle/jquery-ui.min.js",
"../node_modules/tether/dist/js/tether.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.js",
"../misc_modules/ignite-ui/js/infragistics.core.js",
"../misc_modules/ignite-ui/js/infragistics.lob.js",
"../node_modules/spin.js/spin.js"
]
For the loader I never used it before so I just tried it setting it up in the constructor of my app.component or by using a cdn link in my index.html. But neither worked and I'm not really sure where to look for the correct documentation for using it in Angular 4.
Thanks,
Thank you for the update. As long as you are loading the other Infragistics scripts you won’t have to use/load the loader. So far I have been unable to reproduce the behavior you describe. From here the best way for us to assist you is if you provide a small isolated sample that we can run and use for debugging locally. If you are unable able to provide an isolated sample I may be able to give suggestions if you provide the full code for your page.
Hello Mike,
I added a small sample, it's not te prettiest and not entirely correct (structure wise) because it's my first project with angular 4 and infragistics but it shows the problem i'm having. Just do "npm install" first and then "npm start" and the project should run. I changed the startDate column to be without the format and the endDate column with the format. So when you change the date for both with the datepicker (not typing), the grid won't set the date correctly for the endDate.
I also have two follow up questions, how would I use the loader to change the language? (I should need french and dutch) I just tried downloading the igniteUI files again from the website, and I get the fault:
infragistics.ui.regional-nl.js:55 Uncaught ReferenceError: jQuery is not defined at infragistics.ui.regional-nl.js:55
So the loader probably works now, but it's not adapted for Angular 4?
And how do I know if I'm using the paying version of ignite ui, because I always have to add the following to my css:
Thank you for the update. I have run your sample and the reason you are getting this issue is it seems there was a bug in previous version of the Infragistics scripts. You are using the initial release of v16.2. You will want to upgrade to the latest service release for v16.2. Then by setting the format on the column and the dateDisplayFormat and dateInputFormat on the combo editor it should work as expected. To get the latest service release you can do the following:
1) Go to: https://www.infragistics.com/my-account/keys-and-downloads2) Click on your v16.2 Key3) Click the Service Release tab.4) Download the Service release for Ignite UI
As for localizing you can see the following document:https://www.igniteui.com/help/customizing-the-localization-of-netadvantage-for-jquery-controls
The localize script are were the scripts were installer when you ran the installer and should be in the service release as well.
I would recommend to stray away from using the loader if you are using Angular.
As for using the non-trail scripts you have to run the installer with a valid and then it will install the full scripts/css. You then replace the scripts/css in your project with the newly installed scripts. If the trial watermark comes up you are using the trail scripts/css.
Thank you very much, I upgraded to version 17.1 and now it works, the trial mark is also gone. The only problem I still have is the localization but I will try your document first.
Many thanks for the help and have a good weekend!
Thank you for the update. I am glad upgrading has resolved that issue. Please let me know if you have any further questions concerning this matter.