Skip to content

"date" inside an object in object column appears as and will be converted to string after clicking on dashboard #285

Closed
@refre5h

Description

@refre5h

I believe this happened in the new dashboard in parse.com, for such reason I didn't use the new dashboard in parse.com. Now I found that it's also happening here with parse-server and parse-dashboard.

  • You're running version >=2.1.4 of Parse Server.
  • You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

"express": "~4.13.4",
"kerberos": "~0.0.x",
"parse": "^1.8.0",
"parse-server": "~2.2.2",
"parse-dashboard": "~1.0.9"
Heroku
mlab

Steps to reproduce

Step 1.
Create a object column in any class

Step 2.
Write an object that has date in it to this column. Below is the exact copy of one found in our db (mlab).

   "billedSessions": {
        "0": {
            "startTime": {
                "__type": "Date",
                "iso": "2016-04-13T05:10:50.261Z"
            },
            "endTime": {
                "__type": "Date",
                "iso": "2016-04-13T05:11:30.118Z"
            },
            "minutes": 1
        }
    },

Step 3.
Use the client to get this value. The startTime and endTime are both date object (for now).

Step 4.
Go to parse-dashboard and find this value. Note that the date in the object appears as a string instead.

{"0":{"startTime":"2016-04-13T05:10:50.261Z","endTime":"2016-04-13T05:11:30.118Z","minutes":1}}

Step 5.
Double click this value to enter edit state, but don't change anything.

Step 6.
Focus somewhere else to exit the edit state.

Step 7.
Go back to mlab, check the value again, it has beome:

    "billedSessions": {
        "0": {
            "startTime": "2016-04-13T05:10:50.261Z",
            "endTime": "2016-04-13T05:11:30.118Z",
            "minutes": 1
        }
    },

Step 8.
Use the client to get this value again, the type of startTime and endTime have both become string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions