You could have also used the Zen Cart function to create that input field. The function's declaration looks like:
Code:
function zen_draw_input_field($name, $value = '~*~*#', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
$name ... the 'name' of the input field
$value ... the 'value' of the input field
$parameters ... any HTML parameters to be added, e.g. an id.
$type .... the 'type' of the input field, where you can override the default (text)
... so, your input field can be created using the Zen Cart functions using the following PHP code:
Code:
<?php
echo zen_draw_input_field ('edit_date', $date2edit, 'id="edit_date"', false, 'datetime-local');
?>
P.S. That function's output will also be a "proper" input tag, which is a self-closing tag ...