Hello,
While trying to use the igDatePicker and trying to set options I keep getting errors.
$("#date-from").igDatePicker({ width: "250px", dateDisplayFormat: "dd/MM/yy", nullable: false, value: new Date(yesterday.getFullYear(), yesterday.getMonth(), yesterday.getDate())
});
TypeScript throws the following error:
Error TS2345 Argument of type '{ [x: number]: undefined; width: string; dateDisplayFormat: string; nullable: boolean; value: Dat...' is not assignable to parameter of type 'string'.
The only options that do seem to work are the not inherited ones (according to http://help.infragistics.com/jQuery/2014.2/ui.igdatepicker)
So I think the typings file (igniteui.d.ts) may be missing some options? Or am I doing something wrong?
I am using IgniteUI 20142.2477 and typescript 1.6.
Thank you!
Hello Michael,
Thank you for contacting Infragistics!
I created a sample igDatePicker with the options you mention and it runs without issue. I am using version 14.2.20142.2477 in Infragistics Ignite UI for jQuery 2014 Volume 2. I am attaching my sample to this can you run the sample and let me know what behavior you see. Can you please provide isolated sample application that demonstrates the behavior you are seeing?
Note I removed the JS and CSS files so you will want to replace them before running the sample.
Hello Mike P,
The problem is not that the Javascript doesn't work, the problem is that the TypeScript does not compile to Javascript because it does not recognize those properties. They should be set in the typings file (igniteui.d.ts). (see http://www.infragistics.com/community/blogs/angel_todorov/archive/2012/10/27/introducing-typescript-support-for-ignite-ui.aspx)
I have included a small MVC.Net project with the exception as shown in my post. The file with the error is: home.index.ts.
MVC.Net project: http://www.filedropper.com/igdatepicker
Note: This project is created in Visual Studio and TypeScript 1.6.
Thank you.