I am using the paid version of PHPGrid.
My backend is an MS SQL 2014 DB.
I have an editable date time field stored in an ISO 8601 format.
yyyy-mm-ddThh:mm:ss
The field needs to displayed and edited as ISO 120
yyyy-mm-dd hh:mm:ss
$col = array();
$col["title"] = "Checked Date";
$col["name"] = "CheckByDate";
$col["width"] = "10";
$col["formatter"] = "datetime";
$col["dbname"] = "CONVERT(CHAR(23),CheckByDate, 120)";
$col["editable"] = true;
$cols[] = $col;
The datepicker is selecting the corrrect datetime, but when the field is stored incorrectly.
I have tried various $col["formatoptions"] options, but none of them have done the trick.
To store datetime field in format: 2000-07-01T00:00:00+00:00
Edit jqgrid_dist.php
Change:
$data[$c["index"]] = date("Y-m-d H:i:s",strtotime($data[$c["index"]]));
To:
$data[$c["index"]] = date(DATE_ATOM,strtotime($data[$c["index"]]));
I've not tested it but it's from php doc.
I'm unable to understand completely. Please email screenshots, it would help.
If you can share screen on skype, id: gridphp
Made change to jqgrid_dist.php.
Still having same issue.
DatePicker is selecting correct date time
Datetime is being stored correctly in database field in table.
PHPGrid column is displaying datetime incorrectly.
In fact, when editing field with incorrect datetime, the datepicker is picking up the incorrect field to edit.
Kelly