Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 954 Bytes

date-time-local.md

File metadata and controls

32 lines (24 loc) · 954 Bytes

DateTimeLocal Field

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:

Usage Example

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>