jqgrid的日期仅设置为1999-11-30 00:00:00

时间:2013-03-12 11:46:51

标签: php javascript jquery jqgrid

我正在显示一个包含DATETIME值的表。虽然值正确显示,但一旦编辑了datetime值,无论在什么日期写入,它都会自动转换为jqgrid和数据库中的“1999-11-30 00:00:00”日期。 / p>

[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined offset: -1 in /var/www/html/testing/tables/php/jqGrid.php on line 3922, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined offset: 0 in /var/www/html/testing/tables/php/jqGrid.php on line 3980, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: F in /var/www/html/testing/tables/php/jqGrid.php on line 3981, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: M in /var/www/html/testing/tables/php/jqGrid.php on line 3982, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: n in /var/www/html/testing/tables/php/jqGrid.php on line 3984, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: j in /var/www/html/testing/tables/php/jqGrid.php on line 3986, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: o in /var/www/html/testing/tables/php/jqGrid.php on line 3988, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: y in /var/www/html/testing/tables/php/jqGrid.php on line 3989, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: l in /var/www/html/testing/tables/php/jqGrid.php on line 3990, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: D in /var/www/html/testing/tables/php/jqGrid.php on line 3991, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: N in /var/www/html/testing/tables/php/jqGrid.php on line 3992, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: w in /var/www/html/testing/tables/php/jqGrid.php on line 3993, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined variable: month in /var/www/html/testing/tables/php/jqGrid.php on line 3994, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined variable: day in /var/www/html/testing/tables/php/jqGrid.php on line 3994, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined variable: year in /var/www/html/testing/tables/php/jqGrid.php on line 3994, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: G in /var/www/html/testing/tables/php/jqGrid.php on line 3996, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: h in /var/www/html/testing/tables/php/jqGrid.php on line 3997, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: g in /var/www/html/testing/tables/php/jqGrid.php on line 3998, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: O in /var/www/html/testing/tables/php/jqGrid.php on line 3999, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined index: Z in /var/www/html/testing/tables/php/jqGrid.php on line 4000, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined variable: year in /var/www/html/testing/tables/php/jqGrid.php on line 4006, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined variable: month in /var/www/html/testing/tables/php/jqGrid.php on line 4007, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined variable: day in /var/www/html/testing/tables/php/jqGrid.php on line 4008, referer:--------------------users.php
[Tue Mar 12 11:39:28 2013] [error] [client 171.43.1.4] PHP Notice:  Undefined variable: hour in /var/www/html/testing/tables/php/jqGrid.php on line 4010, referer:--------------------users.php

可能导致这样的问题?

我没有为jqgrid使用datepicker附加组件(或任何其他插件)。

我试图在触发提交按钮事件时使用ajax手动更新数据库中的值

$grid->setNavEvent('edit', 'onclickSubmit', $updateDate);

但似乎手动更新被jqgrid更新覆盖了。

可能导致错误日期的原因是什么?

1 个答案:

答案 0 :(得分:1)

$ grid-> setUserTime(“Y-m-d H:i:s”);

干杯。