Represents <input>
element of type "datetime-local" that lets the user to easily enter both a date and a time, including
the year, month, and day as well as the time in hours and minutes. Documentation:
Widget:
use Yiisoft\Form\Field\DateTimeLocal;
echo DateTimeLocal::widget()
->name('partyDate')
->value('2017-06-01T08:30')
->label('Date of party')
->hint('Party date.')
->inputId('datetimelocalform-partydate');
Result will be:
<div>
<label for="datetimelocalform-partydate">Date of party</label>
<input type="datetime-local" id="datetimelocalform-partydate" name="partyDate" value="2017-06-01T08:30">
<div>Party date.</div>
</div>