Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When an column type date is added in a o-table with value null, it is shown 'Invalid Date' #1206

Open
raquelbarreiro opened this issue Apr 26, 2023 · 1 comment

Comments

@raquelbarreiro
Copy link

What is the current behavior?

When an column type date is added in a o-table with value null, it is shown 'Invalid Date'

Steps to reproduce

When an column type date is added in a o-table with value null, it is shown 'Invalid Date'

Affected versions:

  • ontimize-web-ngx: 8.10.0
@raquelbarreiro
Copy link
Author

Update:
We have verified that the error maybe has to do with the fact that the value of the date field is '' or null.

To solve our specific case, if our date is empty (undefined, null or '') we simply remove it from the dto:

For example, instead of:

{"NAME":"James","SURNAME":"Lawrence","STARTDATE":631148400000,"TIME":631148400000,"ACCOUNT":"0002 2095 34 0000000010","ENDDATE":1010271600000,"ACCOUNTTYP":"Savings account","INTERESRATE":0.009899999999999999,"ACCOUNTID":1,"BALANCE":17835,"COMMISSION":"false","NUMCARDS":1,"CLOSED":1,"CARDS":"CUST_HAS_CARDS"}

We use (removing 'STARTDATE' attribute):

{"NAME":"James","SURNAME":"Lawrence","TIME":631148400000,"ACCOUNT":"0002 2095 34 0000000010","ENDDATE":1010271600000,"ACCOUNTTYP":"Savings account","INTERESRATE":0.009899999999999999,"ACCOUNTID":1,"BALANCE":17835,"COMMISSION":"false","NUMCARDS":1,"CLOSED":1,"CARDS":"CUST_HAS_CARDS"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant