3

How can I set undefined or null and make empty to a date field in the parse.com data browser.

There is nothing related with code, in the pic i attached, you can see the parse.com data browser and i want to set undefined or null whatever and make that field empty but whenever i tried and double click the cell, data browser open date widget and it is not allowed to delete the data or there is no button to make empty.

Parse.com Data Browser

3
  • did you try double-clicking and deleting? Commented Dec 6, 2015 at 2:42
  • could you explain a bit more and maybe add some code so it is possible to see what might be causing it? Commented Dec 6, 2015 at 2:48
  • Good question, I have the same problem... Commented Jan 18, 2016 at 21:14

1 Answer 1

2

In data-browser I don't think it's possible to delete a date value, I couldn't find a way to do it at least.

And now that Parse.com will not be maintained anymore(in 01/01/2017 it will shut down), I don't think this may come up as a feature.

My solution to this problem was to make a request to this register and use unset. It gets a bit more of work but solves the problem.

I don't know if you're using parse with Javascript but it can be really easy to adapt to other enviroments.

In Javascript this script should do the trick:

var DateUpdate = Parse.Object.extend("MyTableOnParse");
var dateUpdateEdit = new Parse.Query(DateUpdate);
dateUpdateEdit.equalTo("objectId",myObjectId);
dateUpdateEdit.first({
    success: function(object)
    {    
        object.unset("saleDate");
        object.save({
            success: function(updatedObject) 
            {
               console.log("Data deleted");
            }
        })
    }
});
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.