Hi,
I have a dropdown menu which is populated from a datetime database field, because the time element contains the : character the dropdown options are truncated. can you tell me how to change this so the dropdown shows the full date and time?
The full datetime displays correctly in the table field, please see the link screenshot below, also below is the code for this column.
$col = array();
$col[“title”] = “Start Time”;
$col[“name”] = “timing_group”;
$col[“width”] = “140”;
$col[“editable”] = true;
$col[“align”] = “center”;
$col[“edittype”] = “select”;
$str = $g->get_dropdown_values(“SELECT DISTINCT id AS k, start_time AS v FROM zd4k_timing_groups”);
$col[“editoptions”] = array(“value”=>”:;”.$str);
$col[“formatter”] = “select”;
$col[“stype”] = “select”;
$col[“searchoptions”] = array(“value”=>”:;”.$str);
$cols[] = $col;
Thanks in advance,
Simon
It’s fixed in latest build which I’m emailing you. Thanks for reporting.
Hi Abu,
Thanks for the updated file, I’ve installed this (renaming the existing file and copying in the new version) bust still the fault persists
I’ve attached a new screenshot taken today, the file was updated last week.
Thanks,
Hello,
I am unable to understand your question correctly. What you need is mentioned in documentation.
// In case you want to use different delimiter (:) and separator (;), you can override
$col[“editoptions”][“delimiter”] = “:”;
$col[“editoptions”][“separator”] = “;”;
Ref: https://www.gridphp.com/docs/column-options/#render-as-select-dropdown