Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

parse.com set undefined to date field in data browser

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

like image 882
yasintamer Avatar asked Feb 12 '26 02:02

yasintamer


1 Answers

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");
            }
        })
    }
});
like image 73
Vinicius Vieira Avatar answered Feb 18 '26 15:02

Vinicius Vieira