[dhxcalendarA column] problem with blank field

The dhxcalendarA column works fine, but I use it for some rows which have a ‘duedate’, and some rows don’t.
When I delete the date it appears as a blank cell at first, but upon reloading it shows: -1-11-30
The worst part is that when I click on the cell and try to select a date again afterwards, it doesn’t work anymore. It always bounces back to “-1-11-30” for some reason.

Any ideas?

Unfortunately the problem cannot be reproduced locally.
Could you please, share with a demo link, where the problem can be reproduced or provide with a complete demo, so the issue can be reconstructed locally.

This is a page where I’m trying to do it:
jtc.ae/pre/jtc_manage/?action=task
Please try to edit the dates in the third column. It’s a demo so you can mess around.
Once you delete a date and refresh it will say -1-11-30. And it’s impossible to change the dates afterwards, without fully writing a correct date format by hand.

Best regards.

After the edit of the cell the dataprocessor sends a new value to your server. It’s a “” velue (empty string)
After reloading the page your server loads “0000-00-00” to that cell. This is not a blank field that was sent by the grid and a dataprocessor.


I know. When I look at the server I see it says “0000-00-00” but, why does it show up as ‘-1-11-30’ instead of 0000-00-00??
And the biggest problem: I cannot select a new date after this field is put to ‘-1-11-30’ (or to “0000-00-00” on the server)
Any ideas for that?

You may try to change the value to a correct required date after it changing using the onCellChanged event:
docs.dhtmlx.com/api__dhtmlxgrid_ … event.html
For example:
grid.attachEvent(“onCellChanged”, function(rId,cInd,nValue){
if(cInd==your_calendar_index && nValue==“0000-00-00”){
grid.cellById(rId,cInd).setrValue(“1990-01-01”)
}
});

I had had this issue too, using chrome on a Mac (firefox was okay)

I had to do a fix :-

    function is_date_bad(baddate) {
        baddate = baddate.replace(/[0-9]/g, '');
        if (baddate == '---') return true;
        return false;
    }
            myGridLocation.attachEvent("onXLE", function(obj, count) {
                // bad date fixer
                var cols = [];
                var colNum=myGridLocation.getColumnsNum();
                for (var i = 0; i < colNum; i++) {
                    var type = myGridLocation.getColType(i)
                    if ( (type=='dhxCalendar') || (type=='dhxCalendarA') ) {
                        cols.push(i);
                    }
                }
                myGridLocation.forEachRow(function(id) {
                    for (var i = 0; i < cols.length; i++) {
                        var date = myGridLocation.cells(id,cols[i]).getValue();
                        if (is_date_bad(date)) {
                            myGridLocation.cells(id,cols[i]).setValue('');
                        }
                    }
                });
            });

It basically loops through the columns and sees if the type is a calendar, then loops through all the rows to update those columns IF the date is bad.
The calendar date will now be empty and the popup will now default to today, as on firefox.
On the connector back end any dates that are empty default to 0000-00-00