PHP Grid – Free Version – 1.5.2 – Datepicker not working, after upgrade from 1.4.1

QuestionsPHP Grid – Free Version – 1.5.2 – Datepicker not working, after upgrade from 1.4.1
Derek B asked 10 years ago

Hello,

I have been using PHP Grid version 1.4.1 on my website for a while now (the free version)

I recently downloaded the latest files from your site (1.5.2), but I can no longer get the date picker to work on date columns anymore.

Is this a feature that only works with the paid version now?

Everything else works fine.

Here is my code:

foreach ($field_names AS $field_name)
{
$col = array();
$col["title"] = $field_name; // caption of column
$col["name"] = $field_name; // grid column name, must be exactly same as returned column-name from sql (tablefield or field-alias)
$col["width"] = "150";
$col["editable"] = true;

if (in_array($field_name,$special_columns)) {
if ($field_name==$special_columns[0]) { $col["formatter"]="date"; $col["formatoptions"] = array("srcformat"=>'Y-m',"newformat"=>'Y-m'); $col["editoptions"]=array('maxlength'=>7); }
elseif ($field_name==$special_columns[1]) { $col["editable"] = false; $col["width"] = "38"; }
elseif ($field_name==$special_columns[2]) { $col["edittype"] = "select"; $col["editoptions"]=array("value"=>substr($states_dropdown,0,-1)); }
elseif ($field_name==$special_columns[3]) { $col["edittype"] = "select"; $col["editoptions"]=array("value"=>substr($folder_types_dropdown,0,-1)); }
}
elseif (in_array($field_name,$date_columns)) { $col["formatter"]="date"; }
elseif (in_array($field_name,$rating_columns)) { $col["edittype"] = "select"; $col["editoptions"]=array('value'=>$ratings_dropdown); }
elseif (in_array($field_name,$yes_no_notsure_columns)) { $col["edittype"] = "select"; $col["editoptions"]=array('value'=>$yes_no_notsure_dropdown); }
elseif (in_array($field_name,$true_false_columns)) { $col["edittype"] = "select"; $col["editoptions"]=array('value'=>$true_false_dropdown); }
elseif (in_array($field_name,$yes_no_columns)) { $col["edittype"] = "select"; $col["editoptions"]=array('value'=>$yes_no_dropdown); }

$cols[] = $col;
}

//Set up the Data Grid
$g = new jqgrid();

// $grid["url"] = ""; // your paramterized URL — defaults to REQUEST_URI
$grid["rowNum"] = 30; // by default 20
$grid["sortname"] = 'RowID'; // by default sort grid by this field
$grid["sortorder"] = "ASC"; // ASC or DESC
$grid["caption"] = $table; // caption of grid
$grid["autowidth"] = true; // expand grid to screen width
$grid["shrinkToFit"] = false;
$grid["height"] = "auto";
$grid["multiselect"] = false; // allow you to multi-select through checkboxes
// RTL support
// $grid["direction"] = "rtl";

$g->set_options($grid);

$g->set_actions(array(
"add"=>true, // allow/disallow add
"edit"=>true, // allow/disallow edit
"delete"=>true, // allow/disallow delete
"rowactions"=>true, // show/hide row wise edit/del/save option
"autofilter" => true, // show/hide autofilter for search
"search" => "advance" // show single/multi field search condition (e.g. simple or advance)
)
);

// this db table will be used for add,edit,delete
$g->table = $table;

// pass the cooked columns to grid
$g->set_columns($cols);

// generate grid output, with unique grid name as 'list1'
$out = $g->render("list1");

3 Answers
Abu Ghufran answered 10 years ago

Hello,

Yes. Datepicker is moved to licensed version, along with several other intergration libraries. (e.g. timepicker, select2, wysiwyg, tagit etc)

Derek B answered 10 years ago

Thanks for the quick response.

Abu Ghufran answered 10 years ago

If you already own an old license, you can renew at discounted prices for updates and technical support.
Contact me back on [email protected] for details.

Your Answer

9 + 6 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?