Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 839 Bytes

date.md

File metadata and controls

32 lines (24 loc) · 839 Bytes

Date Field

Represents <input> element of type "date" that lets the user enter a date, either with a textbox that validates the input or with a special date picker interface. Documentation:

Usage Example

Widget:

use Yiisoft\Form\Field\Date;

echo Date::widget()
    ->name('DateForm[birthday]')
    ->value('1996-12-19')
    ->label('Your birthday')
    ->hint('Birthday date.')
    ->inputId('dateform-birthday');

Result will be:

<div>
    <label for="dateform-birthday">Your birthday</label>
    <input type="date" id="dateform-birthday" name="DateForm[birthday]" value="1996-12-19">
    <div>Birthday date.</div>
</div>