achse/nette-date-time-interval-input

DateTimeInterval Input implementation for Nette Forms.

3.0.0 2018-05-15 20:31 UTC

README

Downloads this Month Latest Stable Version Build Status Scrutinizer Code Quality Coverage Status

Basic info

Installation

composer require achse/nette-date-time-interval-input

Usage

Basic usage is to add into your BaseForm or FormElements trait code like this:

/**
 * @param string $name
 * @param string|NULL $label
 * @param IDateTimeIntervalConverter|string $intervalConverterOrDateTimeFormat
 * @return DateTimeIntervalInput
 */
public function addDateTimeInterval($name, $label = NULL, $intervalConverterOrDateTimeFormat = 'j. n. Y')
{
    return $this[$name] = DateTimeIntervalInputFactory($label, $dateTimeIntervalConverter);
}