承接 anh/datetimepicker-bundle 相关项目开发

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

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

anh/datetimepicker-bundle

Composer 安装命令:

composer require anh/datetimepicker-bundle

包简介

Symfony bundle which implements jQuery UI date and time pickers in a Form Type Extension.

README 文档

README

Symfony bundle which implements jQuery UI date and time pickers in a Form Type Extension.

Download using composer

$ php composer.phar require anh/datetimepicker-bundle

Enable the bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Anh\DateTimePickerBundle\AnhDateTimePickerBundle(),
    );
}

Install assets

$ app/console sp:bower:install

Create form field(s)

<?php
// Form/ExampleType.php

public function buildForm(FormBuilderInterface $builder, array $options)
{
    // ...
    $builder
        ->add('dateTimeField', 'datetime', array(
            'picker' => true,
            'format' => 'yyyy-MM-dd HH:mm:ss',
            'separator' => ' '
        ))
    ;
    // ...
    $builder
        ->add('dateField', 'date', array(
            'picker' => true,
            'format' => 'dd.MM.yyyy'
        ))
    ;
    // ...
    $builder
        ->add('timeField', 'time', array(
            'picker' => true,
            'with_seconds' => true
        ))
    ;
    // ...
}

Include resources

Bundle provides assets for javascript and stylesheet — @anh_dateTimePicker_js and @anh_dateTimePicker_css. Don't forget to include jQuery and jQuery UI.

{% block javascripts %}
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

    {% javascripts
        '@anh_dateTimePicker_js'
    %}<script src="{{ asset_url }}"></script>{% endjavascripts %}
{% endblock %}
{% block stylesheets %}
    <link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" rel="stylesheet">

    {% stylesheets
        '@anh_dateTimePicker_css'
    %}<link rel="stylesheet" href="{{ asset_url }}" />{% endstylesheets %}
{% endblock %}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-10-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固