tomaskarlik/dateinput

1.0 2018-05-10 00:07 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);