2017 © Pedro Peláez
 

symfony-bundle beta-datetimepicker-bundle

Symfony bundle for Bootstrap DateTime picker

image

digitalframe/beta-datetimepicker-bundle

Symfony bundle for Bootstrap DateTime picker

  • Thursday, March 26, 2015
  • by digitalframe
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 58 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

DatetimepickerBundle

This bundle implements the Eonasdan Bootstrap DateTime Picker in a Form Type for Symfony 2.*. The bundle structure is inspired by GenemuFormBundle and Fork of SCDatetimepickerBundle., (*1)

Demo : http://eonasdan.github.io/bootstrap-datetimepicker/, (*2)

Please feel free to contribute, to fork, to send merge request and to create ticket., (*3)

Installation

Step 1: Install DatetimepickerBundle

Add the following dependency to your composer.json file:, (*4)

``` json { "require": {, (*5)

    "digitalframe/datetimepicker-bundle": "dev-master"
}

}, (*6)


and then run ```bash php composer.phar update digitalframe/datetimepicker-bundle

Step 2: Enable the bundle

``` php <?php // app/AppKernel.php, (*7)

public function registerBundles() { $bundles = array( // ... new Digitalframe\DatetimepickerBundle\DigitalframeDatetimepickerBundle(), ); }, (*8)


``` yml # app/config/config.yml digitalframe_datetimepicker: picker: ~

Step 3: Initialize assets

``` bash $ php app/console assets:install web/, (*9)


## Usages ``` php <?php // ... public function buildForm(FormBuilder $builder, array $options) { $builder // defaut options ->add('createdAt', 'df_datetime') // full options ->add('updatedAt', 'df_datetime', array( 'locale' => 'es', 'format' => 'DD/MM/YYYY' )) ; }

Add form_javascript and form_stylesheet, (*10)

The principle is to separate the javascript, stylesheet and html. This allows better integration of web pages., (*11)

Example:

``` twig {% block stylesheets %} , (*12)

{{ form_stylesheet(form) }}

{% endblock %}, (*13)

{% block javascripts %} , (*14)

{{ form_javascript(form) }}

{% endblock %}, (*15)

{% block body %}, (*16)

{{ form_widget(form) }}

{% endblock %} ```, (*17)

Documentation

The documentation of the datetime picker is here : http://eonasdan.github.io/bootstrap-datetimepicker/Options/, (*18)

Notes

The date format from php 'array('format'=>'DD/MM/YYYY') is used to set automatically the date format of Symfony in order to make compatible Symfony and JavaScript output., (*19)

The Versions

26/03 2015

dev-master

9999999-dev

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Ricardo Pineda

bootstrap bundle symfony datepicker timepicker picker

27/02 2015

1.0.1

1.0.1.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

27/02 2015

0.1.0.x-dev

0.1.0.9999999-dev

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker