Error on date column filter

Not Answered This post has 0 verified answers | 7 Replies | 2 Followers Thread's RSS feed.

Ben Hull
Points 680
Replied On: Thu, Aug 10 2017 7:48 AM Reply

Version: 17.1.20171.1012

When adding a "Date" column to a grid that has the filtering feature enabled,

I am receiving the error below after selecting a date to filter on.

Error: Unable to get property 'day' of undefined or null reference

Am i missing an additional JavaScript library?

Attached is an example, change extension to html.

Thanks

Ben

  • Post Points: 20

All Replies

[Infragistics]Tsanna
Points 15,050
Infragistics Employee
Replied On: Fri, Aug 11 2017 9:47 AM Reply

Hello Ben,

What do you mean by "when adding a Date column"? Do you mean to perform CRUD operations on the grid like adding, updating, deleting? In this case you should enable Updating feature as well. Please give me more details around your issue cause I'm not sure I understood it properly.

Regards,
Tsanna

Associate Software Developer

  • Post Points: 20
Ben Hull
Points 680
Replied On: Fri, Aug 11 2017 10:00 AM Reply

Sorry.

If I attempt to change  the filter condition on the date to, "Today" or "Yesterday" or "This Month".  Any filter condition that would execute the filtering action causes the issue.

If i select a Date from the Date picker in the filter, the issue occurs.

I have attached two screenshots


  • Post Points: 35
[Infragistics]Tsanna
Points 15,050
Infragistics Employee
Replied On: Mon, Aug 14 2017 8:00 AM Reply

Hi Ben,

I was able to reproduce your issue and logged an internal bug in our system, so that our developers could take a look at it and suggest a fix. I've also opened a private case for you where this issue is attached. The case is with number: CAS-186324-K3Y8W5 and the bug is with id: 241035.

Please let me know if you have any questions.

Regards,

Tsanna

Associate Software Developer

  • Post Points: 5
[Infragistics]Tsanna
Points 15,050
Infragistics Employee
Replied On: Tue, Aug 15 2017 7:16 AM Reply

Hello Ben,

After further investigation of this matter, it seems that from v17.1 the igDataSource doesn't accept Microsoft date formatting (/Date(1234656000000)/). So if the provided data source contains this kind of data you should change it to ISO UTC format, for example: "2009-02-15T00:00:00Z". Here is an article related to this for your reference: https://www.igniteui.com/help/migrating-enableutcdates-option-in-17-1
If you have any questions, please let me know.

Regards,
Tsanna

Associate Software Developer

  • Post Points: 20
Ben Hull
Points 680
Replied On: Tue, Aug 15 2017 9:18 AM Reply

Hello Tsanna,

I do not believe this is an acceptable solution.

The Microsoft RESTful date format works correctly in the grid as well as with the sorting feature on the grid, which leads me to believe the igDataSource does accept this format.

  • Post Points: 5
Ben Hull
Points 680
Replied On: Tue, Aug 15 2017 2:57 PM Reply

I also noticed that when applying an ISO 8601 formatted date, the filter works, but if you add a hidden column to the grid with a date type, the filtering still causes the same error.

attached an example of this.

  • Post Points: 20
[Infragistics]Tsanna
Points 15,050
Infragistics Employee
Replied On: Wed, Aug 16 2017 8:05 AM Reply

Hello Ben,

From 17.1 when the date is serialized in the Microsoft format, the data source is not able to de-serialize it properly and keeps it as this string. This may give the impression that some operations work (like sorting) because the data source will execute them on the stored strings and under certain conditions the Microsoft-formatted date will have the same sorting result as the one from sorting the actual dates. Other features, like Filtering, try to execute date-specific expressions on these strings and fail.

As for the issue with the hidden column, this has been determined to be a bug and similarly to the previous one I logged it in our internal tracking system with ID: 241197.

Please note that you will be automatically notified in the case I created previously, once the issue is resolved.

If you have any questions, please let me know.

Regards,

Tsanna

Associate Software Developer

  • Post Points: 5
Page 1 of 1 (8 items) | RSS