| Index
» Projekty
» phpMyEdit
» Fórum
» Read-only field and datemasks |
 |
KarelB
Založený: 01.06.2007
Príspevky: 24
Zaslal: 2008-01-30 10:19
Návrat hore
Odpovedať s citátom
|
Hello all,
I have the following problem:
I have a date field which is read-only and should show in the Change view. So I add the option R and it behaves as I expect.
However when I try to modify the display with option 'strftimemask' the field disappears in Change view.
Here are the options i use:
'name' => 'somedate',
'select' => 'T',
'width' => 30,
'strftimemask' => '%d %b %Y',
'options' => 'LFCR',
'nowrap' => true,
'sort' => true
Remove the strftimemask option or the R and it works again.
What am i missing here.
Karel
|
myksa
Založený: 16.10.2007
Príspevky: 14
Zaslal: 2008-01-30 10:30
Návrat hore
Odpovedať s citátom
|
You can use
'strftimemask|LF' => '%d %b %Y'
so timemask would be applied only in list/filter modes.
|
KarelB
Založený: 01.06.2007
Príspevky: 24
Zaslal: 2008-01-30 10:44
Návrat hore
Odpovedať s citátom
|
Myksa, thanks for your quick response.
But I am looking for a way to format my date string in the read-only mode as well.
Is this a bug or is it designed this way?
BTW the standard MySQL date format is confusing for some people in Holland. 2008-01-02 might be interpreted as the second of Jan or the first of Feb. Hence my strftimemask option.
|
zucarino
Založený: 29.12.2005
Príspevky: 44
Bydlisko: Rio de Janeiro - Brazil
Zaslal: 2008-01-30 16:37
Návrat hore
Odpovedať s citátom
|
| KarelB Napísal: |
| But I am looking for a way to format my date string in the read-only mode as well. |
Hi KarelB,
Try this:
| Kód: |
| $opts['fdd']['field_name']['sql|CF'] = 'DATE_FORMAT(field_name, "%d %b %Y")'; |
Best regards!
_________________ ---
Victor Zucarino
vffzbr at yahoo dot com dot br
|
KarelB
Založený: 01.06.2007
Príspevky: 24
Zaslal: 2008-01-31 12:07
Návrat hore
Odpovedať s citátom
|
That seems to work.
Thanks for the support.
Cheers
KArel
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|