When I try to add a onchange event to a date field (vs a drop down) so
that when user selects different date from datepicker icon it then
effects another field drop down, it works but I lose the datepicker
functionality (the small calendar icon disappears). I have to
manually select a date then by typing in date manually into date field
and it works great in that it refreshes/updates the drop down for the
other field, but I would like to retain the datepicker icon/popup
calendar functionality.
Thoughts?
Here is my example code for the date field, again it works great but I
lose datepicker popup calendar icon/functionality from the date field
now, but I can manually enter date and onchange works still:
———
$col = array();
$col[“title”] = “Date”;
$col[“name”] = “s_date”;
$col[“width”] = “75”;
$col[“formatter”] = “date”;
$col[“editable”] = true; // this column is editable
$col[“editoptions”] = array(
20, “defaultValue” => date(“Y-m-d”),
array( “sql”=>
“select the_id as k, the_name as v from
customers where the_date = ‘{s_date}'”,
“update_field” => “s_account_id” ));
$cols[] = $col;
———
Hello,
This is not supported now in datepicker. I tested this code in latest version and it freezes up. Don’t know how it is working on your side. If you can tell your version, i can try regenerating / updating code.
PS: Your email address is not listed in our system, so kindly email me at [email protected] your contract details.
Just found your direct email as well. I’ll check and update back.
So there is no way to make onchange event work on datepicker/date field is that what you are saying?
So there is no way to make onchange event work on datepicker/date field is that what you are saying?
Anything that can be done here for this datepicker issue when onchange is used with it?
Hi Jim,
Apologies for the delay in updating back.
Issue is i am unable to get this behavior on latest 2.6.3 build. I need to compare both versions first and see what is limiting it and update you back after merging / testing your exact need.
It may take some time and ticket will remain open for updates.
You can connect add / edit dialog afterShowForm event and reconnect datepicker to that field.
$opt[“add_options”][“afterShowForm”] = “function(){ link_date_picker($(‘#invdate’),’yy-mm-dd’); }”;
$opt[“edit_options”][“afterShowForm”] = “function(){ link_date_picker($(‘#invdate’),’yy-mm-dd’); }”;
$g->set_options($opt);
Here invdate is field name.