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
2732
igDatePicker TypeScript typing files missing properties?
posted

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'.

Error

The only options that do seem to work are the not inherited ones (according to http://help.infragistics.com/jQuery/2014.2/ui.igdatepicker)

  • button
  • datepicketOptions
  • focusOnDropDownOpen

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!

Parents
No Data
Reply
  • 25665
    Offline posted

    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.

    igDatePicker.zip
Children