I'm using the Paid version with MS SQL database.
I need an editable date column. In SQL, dates show 2014-01-01, or y-m-d.
Here's the code for one of my columns:
$col = array();
$col["title"] = "Actual Ship Date";
$col["name"] = "actual_ship_date";
$col["width"] = "80";
$col["formatter"] = "date"; // format as date
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/y');
$col["editable"] = true;
$col["datefmt"] = "Y-m-d";
$cols[] = $col;
However, when I use the dialog (I don't use in-line editing) to edit the row, every date shows (and inserts into the DB) December 31, 1969.
If I comment out "formatoptions" and "datefmt" then it works fine … but then I can't customize the format of the date, which I need to do. Needs to show d/m/y instead of Y-m-d
?????
Try removing datefmt.
Also check what date format is stored in database table. According to your code, it should be Y-m-d
I have removed datefmt, but the same error still occurs. HOWEVER – I noticed it only occurs when the "day" is > 12. Perhaps a bug in the formatoptions??
Yes I have verified that the MS SQL database (using Management Studio) shows Y-m-d