set_col_date() not working properly
I am having problems with setcoldate(). I am getting teh following error: Please, enter valid date value - d M y
Here is my code:
$dg -> setcoldate("QSPDate", "Y-m-d", "d M y", "yy-mm-dd");
$dg -> setcoldate("QSPExpiry", "Y-m-d", "d M y", "yy-mm-dd");
Not sure what I am doing wrong??
Please see updated document on this function to address the confusion.
-
AdminRichard (Admin, phpGrid) commented
Please see updated document on this function to address the confusion.
-
Ragi Sekaly commented
Solved it!
$dg -> set_col_property("QSP_Date",array("formatter"=>"date", "formatoptions"=>array("srcformat"=>"ISO8601Short","newformat"=>"d M Y")));
-
trnie commented
Looks like the same problem I have been trying to solve.
Trond. -
Ragi Sekaly commented
Changed to $dg -> set_col_date("QSP_Date", "Y-m-d", "d M y", "d M y");
Still get the same error.