Thank you very much for your fast answer Colin and Allan.
I want that the User can select and save a time value. (Better write the time value)
I tried many times to let it work but in the Database the value is saved every time as
"00:20:18"
Please help me.
My MySQL Table colum type is TIME
/lib/Editor.php = version 1.6.0
I would suggest updating to Editor 1.7.2 (including the server-side libraries) as the first port of call since there have been a number of bug fixes since 1.6.0.
Can you show me what is being submitted to the server (from your browser's "Network" inspect in the "headers" section) and also a screenshot of the form.
Even better would be a link to the page showing the issue if that is possible.
Yes - for that on the client-side use dateTime and specify only the time part in the format, and likewise on the PHP script use the dateTime formatter with only the time part specified.
Answers
Hi Karasu,
This forum post may help.
Cheers,
Colin
This example shows the
datetime
input being used inline (Start date column).Allan
Thank you very much for your fast answer Colin and Allan.
I want that the User can select and save a time value. (Better write the time value)
I tried many times to let it work but in the Database the value is saved every time as
"00:20:18"
Please help me.
My MySQL Table colum type is TIME
/lib/Editor.php = version 1.6.0
My PHP code
My JS code
I would suggest updating to Editor 1.7.2 (including the server-side libraries) as the first port of call since there have been a number of bug fixes since 1.6.0.
Allan
Ok Allan, I will update the Editor and look how many script changes I must do
Thank you
Dear Allan,
I updated to v1.7.2 and all is fine working without adjustments in the scripts.
But the date is saved as same as yesterday --> "00:20:18".
Which information I can give you to solve this little issue ?
I am out of my ideas....
Can you show me what is being submitted to the server (from your browser's "Network" inspect in the "headers" section) and also a screenshot of the form.
Even better would be a link to the page showing the issue if that is possible.
Allan
I changed the Database column type to datetime and changed my script as below.
The date is saved but the time not.
PHP
JS
Hi Allan, sorry I cannot give you a URL.
Did you need this informations attached as screenshots?
Don't use
Format::date_sql_to_format
(and its counter part) for date and time formatting. It is for date only.Use the
dateTime
formatter for date and time formatted strings.Allan
Great Allan many thanks.
I completely overlooked the difference.
Last question (because I don't fin it in the documentation):
Is it possible to do this ONLY for TIME VALUE?
e.g. Format HH:MM = 18:15
Yes - for that on the client-side use
dateTime
and specify only the time part in the format, and likewise on the PHP script use thedateTime
formatter with only the time part specified.Example available here.
Allan
Hi Allan,
Thank you for your fast and great support.
BR