tomaskarlik/dateinput

Date input for Nette forms

1.0 2018-05-10 00:07 UTC

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);