0
I have this code:
$tabela5 .= '<td> <input type="datetime-local" name= "DataInicio" id= "DataInicio" value="'. date("Y-m-d H:i:s") .'"></td>';
But the input does not show the current date and time.
0
I have this code:
$tabela5 .= '<td> <input type="datetime-local" name= "DataInicio" id= "DataInicio" value="'. date("Y-m-d H:i:s") .'"></td>';
But the input does not show the current date and time.
1
Trade for this:
date("Y-m-d\TH:i:s")
In HTML you must have a T
between date and time. The \
is to escape it
Browser other questions tagged php html
You are not signed in. Login or sign up in order to post.