You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2024. It is now read-only.
I am trying to submit my data through REST and this includes a Pikaday object.
Following is the error:
TypeError: Converting circular structure to JSON
at Object.stringify (native)
I partially manage to get around by using .getString(), but then I need to check if there is an object (because the function does not work on undefined, in case the date is optional).
Probably something I am overlooking, any suggestion is appreciated!
The text was updated successfully, but these errors were encountered:
I am binding a form including dates. I then submit the model linked to this form to the REST backend through rest-angular.
The challenge with pikaday-angular thus is that I would have to replace the dates from the model in the Controller, which is not a huge issue but somehow a bit less elegant.
Furthermore, I am struggling with optional date fields as well.
I can disable a field, which makes that the property on that model is not present. So calling .getString() function will not work, as the date is undefined.
If there is a Pikaday object, but no input, then the .getString() does work. However, in my case I can not simply submit an empty string but I need to delete the property. This however is backend specific...
So this leads to some dirty if-else statements in the code. No big deal, just pointing a potential win here for improvement.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey,
I am trying to submit my data through REST and this includes a Pikaday object.
Following is the error:
TypeError: Converting circular structure to JSON
at Object.stringify (native)
I partially manage to get around by using .getString(), but then I need to check if there is an object (because the function does not work on undefined, in case the date is optional).
Probably something I am overlooking, any suggestion is appreciated!
The text was updated successfully, but these errors were encountered: