I have a MySQL database with a TIME field (H:i:s). I want to be able to only display and edit the time field in hours and minutes, 17:30 for example. The issue is I do NOT want the datepicker control displayed. I just want to hand key in the value but I only want the hours and minutes displayed (and when editing or adding) in the grid but still update the database as 17:30:00.
I tried to code below but it does not work as intended.
$col["formatter"] = "datetime";
$col["formatoptions"] = array("srcformat"=>'H:i:s',"newformat"=>'H:i',"opts" => array("timeOnly" => true),"opts" => array("controlType" => 'select'));
$col["editrules"] = array("required"=>false); // and is required
$cols = $col;
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!