tomaskarlik / dateinput
Date input for Nette forms
1.0
2018-05-10 00:07 UTC
Requires
- php: ^7.1
- nette/di: ^2.4
- nette/forms: ^2.4
- nette/php-generator: ^2.4
- nette/utils: ^2.4
This package is not auto-updated.
Last update: 2024-12-18 03:56:01 UTC
README
Install
Download package
composer require tomaskarlik/dateinput
Register extension in config.neon
dateinput: TomasKarlik\DateInput\DateInputExtension
Usage
$form->addDate('dateTo', 'Datum do:') ->setRequired('Zadejte datum do!') ->addRule(Form::VALID, 'Zadejte platné datum!') ->setAttribute('class', 'datepicker'); $form->addDate('date', 'Date:', 'Y-m-d') ->setRequired(FALSE) ->addRule(Form::VALID) ->setDefaultValue(new DateTime);