I have tried several different date formats to save the date into mysql database as “yyyy-MM-dd” and it wont work.
I have changed the field col in mysql as text and it inserts the long date time as a string.
What am I doing wrong here?
This is what I have,
{text: ‘Date’, datafield: ‘date1’, columntype: ‘datetimeinput’, width: 200, align: ‘right’, cellsalign: ‘left’, cellsformat: ‘yyyy-MM-dd’,
validation: function (cell, value) {
if (value == “”)
return true;
var year = value.getFullYear();
if (year >= 2014) {
return { result: false, message: “Date should be before 1/1/2014” };
}
return true;
}
},