承接 nella/forms-datetime 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nella/forms-datetime

最新稳定版本:v2.4.3

Composer 安装命令:

composer require nella/forms-datetime

包简介

Date/DateTime control for Nette Forms.

README 文档

README

Build Status Code Coverage SensioLabsInsight Status Latest Stable Version Composer Downloads Dependency Status

Requirements

  • Nette >=2.3.0 (2.3.x support will be removed on 31 Jan 2017)
  • PHP >=5.5.0 (5.5.x support will be removed on 10 Jul 2016)

Installation

composer require nella/forms-datetime

Usage

$form = new \Nette\Forms\Form;
$form->addComponent(new \Nella\Forms\DateTime\DateInput('Date'), 'date');
$form->addComponent(new \Nella\Forms\DateTime\DateTimeInput('DateTime'), 'datetime');

// or

\Nella\Forms\DateTime\DateInput::register();
$form->addDate('date', 'Date', 'Y-m-d');

\Nella\Forms\DateTime\DateTimeInput::register();
$form->addDateTime('datetime', 'DateTime', 'Y-m-d', 'G:i');

// Optional date[time] validation
$form['date']
	->addCondition(\Nette\Application\UI\Form::FILLED)
		->addRule([$form['date'], 'validateDate'], 'Date is invalid');

$form['datetime']
	->addCondition(\Nette\Application\UI\Form::FILLED)
		->addRule([$form['datetime'], 'validateDateTime'], 'Date time is invalid');

Manual rendering

{form myForm}
	{label date /}
	{input date}

	{label datetime /}
    {input datetime:date}
    {input datetime:time}
{/form}

License

Date/DateTime control for Nette Framework is licensed under the MIT License - see the LICENSE file for details

统计信息

  • 总下载量: 18.99k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-16