i will answer myself 😀
use the colmodel option “fixed” => true.
that is it. Thanks for fast response.
PHP 7.1.9.
so should look like: https://s14.postimg.org/sbasm41fl/screenshot2.png
the classic german notation dd.mm.yyyy.
the format is right in the pdf but the date itself is wrong.
OK. But it doesnt work for me. See Screenshot https://s14.postimg.org/tpyl5z8rl/screenshot.png
Thanks. That works fine.
But the date fields are still in wrong format if i export to pdf.
i will try to explain better.
i have an column with an date in my grid with the following code:
1 2 3 4 5 6 7 8 9 10 11 12 |
$grid->setUserDate("Y-m-d"); $grid->setUserTime("Y-m-d"); $grid->datearray = array("terminVon"); $grid->setColProperty('terminID', [ 'label' => 'ID', 'hidden' => true, 'width' => 40, "colmenu" => false, 'editoptions' => [ 'readonly' => true] ]); |
All data is stored in in mysql database. the col with the date ist stored as the standard mysql type ‘date’.
All work fine so far. the date appears as YYYY-MM-DD, the html inputfield (type=”date”) use this format and the database use this format also. But in Germany we have DD.MM.YYYY as notation for date.
So I just want to format the date for the output in the grid in german notation. Otherwise, both in the editform and in the database the date format should be used “raw”.
I hope despite my bad English, I could explain my request.
OK.
Is an exact date for release known?
exacly. i have to format the grid and form edit field diffrently. to be precise, I would like to format a field in the grid and unformated it in the form field.
Thanks.
is there an method in php?
Works fine. thx
This is not the optimal solution but it works.
Thx
Sorry, i have already a solution. 🙂
It works.
thx.
Hello, I mean example with test data where we can see where the problem ist! Hope it is clear. Kind Regards, Will
Thats really difficult.
I have investigated the problem. Maybe it depends on my PHP version (i use 7.0.16-1dotdeb+8.1)
The typecast is the problem:
1 2 3 |
case 'int': $stmt->bindValue($key + 1, (int) $field, PDO::PARAM_INT); break; |
So, i have fixed my problem with the following simple change.
1 2 3 4 |
case 'int': $field = (int) $field; $stmt->bindValue($key + 1, $field, PDO::PARAM_INT); break; |
Greets Andre
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top