I am trying to use datetimepicker as per your example (demos/integrations/datetimepicker.phps)
$col = array();
$col[“title”] = “Date”;
$col[“name”] = “sampled”;
$col[“width”] = “150”;
$col[“editable”] = true;
$col[“formatter”] = “datetime”;
$col[“formatoptions”] = array(“srcformat”=>’Y-m-d H:i:s’,”newformat”=>’d/m/Y H:i:s’,”opts” => array());
$col[“show”] = array(“list”=>true, “add”=>true, “edit”=>true, “view”=>true);
$cols = $col;
I am also including trentrichardson’s timepicker js/css (I believe you are using the same one)
My problem is that when I click the calendar icon, I get a datepicker not a datetimepicker.
Time sliders are missing.
I’ve tried it both with included jquery and wifth 3.3.1+migrate…same result.
Debug console is error free.
$col[“formatter”] = “datetime” behaves exactly the same as $col[“formatter”] = “date”
If you using some bootstrap theme, then bootstrap js could be overriding datepicker function.
One way to test is to comment out theme JS files and see when it work.
Another solution could be to inlcude date time picker library at last of included files.
I was actually just about to answer my own question…:-)
I am indeed using bootstrap but problem was lying in a different place.
This is a very old project of mine and I am allready using jquery-ui.min.js
Since I started using phpgrid I am also referencing your bundled jquery-ui.custom.min.js
I just missed the fact that I am referencing same stuff twice 🙂
Didn’t really pay any attention, didn’t have any issues….until now
I commented out my original jquery-ui.min.js and left only with your jquery-ui.custom.min.js
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?