You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
When I try to add a time element in datatable with inplace editor, when I edit a value the following error is returned
DatatableController::prepareValue(): The field type time is not editable.
To solve the issue I have added the Type::TIME in the DatatableController at this position.
So the final method looks like this
private function normalizeValue($originalTypeOfField, $value)
{
switch ($originalTypeOfField) {
case Type::DATETIME:
case Type::TIME:
$value = new DateTime($value);
break;
case Type::BOOLEAN:
$value = $this->strToBool($value);
break;
case Type::TEXT:
case Type::STRING:
break;
case Type::SMALLINT:
case Type::INTEGER:
$value = (int) $value;
break;
case Type::BIGINT:
$value = (string) $value;
break;
case Type::FLOAT:
case Type::DECIMAL:
$value = (float) $value;
break;
default:
throw new Exception("DatatableController::prepareValue(): The field type {$originalTypeOfField} is not editable.");
}
return $value;
}
I will submit a PR
After this addition no problem, saving is fine.
The text was updated successfully, but these errors were encountered:
When I try to add a time element in datatable with inplace editor, when I edit a value the following error is returned
To solve the issue I have added the
Type::TIME
in the DatatableController at this position.So the final method looks like this
I will submit a PR
After this addition no problem, saving is fine.
The text was updated successfully, but these errors were encountered: