voda/date-input 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

voda/date-input

最新稳定版本:2.2.0

Composer 安装命令:

composer require voda/date-input

包简介

HTML 5 compatible date / time input field for Nette.

README 文档

README

Nette forms component for selecting date and time values.

In PHP this addon works with DateTime objects, in the browser it uses jqueryUI calendar with timepicker addon. Look at some examples at the demo page.

Build Status Latest Stable Version Total Downloads License

JS dependencies

Installation

$ composer require voda/date-input

package can be also installed using bower: $ bower install voda-date-input --save

insert required javascript and style files into your layout (order of scripts is important):

<script type='text/javascript' src="{$basePath}/scripts/jquery-ui-timepicker-addon.js"></script> <script type='text/javascript' src="{$basePath}/scripts/dateInput.js"></script> <link rel="stylesheet" type="text/css" href="{$basePath}/styles/jquery-ui-timepicker-addon.css"> <link rel="stylesheet" type="text/css" href="{$basePath}/styles/dateInput.css">

register the addon in your bootstrap.php:

Vodacek\Forms\Controls\DateInput::register(); 

initialize the calendar using javascript:

$(document).ready(function() { $('input[data-dateinput-type]').dateinput({ 'datetime-local': { dateFormat: 'd.m.yy', timeFormat: 'H:mm', options: { // options for type=datetime-local changeYear: true } }, date: { dateFormat: 'd.m.yy' }, month: { dateFormat: 'MM yy' }, week: { dateFormat: "w. 'week of' yy" }, time: { timeFormat: 'H:mm' }, options: { // global options closeText: "Close" } }); });

Usage

$form->addDate('datetimeLocal', 'Local datetime', DateInput::TYPE_DATETIME_LOCAL) ->setRequired() ->setDefaultValue(new DateTimeImmutable()) ->addRule(Form::RANGE, null, array(new DateTimeImmutable('-2 years'), new DateTimeImmutable('+2 years')));

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 2
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固