2017 © Pedro Peláez
 

symfony-bundle datetimepicker-bundle

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

image

anh/datetimepicker-bundle

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

  • Thursday, January 16, 2014
  • by hilobok
  • Repository
  • 1 Watchers
  • 0 Stars
  • 154 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

AnhDateTimePickerBundle

Symfony bundle which implements jQuery UI date and time pickers in a Form Type Extension., (*1)

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., (*2)

{% block javascripts %}
    
    <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 %}

The Versions

16/01 2014

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

by Andrew Hilobok

16/01 2014

v1.1.2

1.1.2.0

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

  Sources   Download

MIT

The Requires

 

by Andrew Hilobok

14/01 2014

v1.1.1

1.1.1.0

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

  Sources   Download

MIT

The Requires

 

by Andrew Hilobok

14/01 2014

v1.1.0

1.1.0.0

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

  Sources   Download

MIT

The Requires

 

by Andrew Hilobok

04/11 2013

v1.0.0

1.0.0.0

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

  Sources   Download

MIT

by Andrew Hilobok