2017 © Pedro PelĂĄez
 

symfony-bundle datetimepicker-bundle

Symfony bundle for Bootstrap DateTime picker

image

qambar/datetimepicker-bundle

Symfony bundle for Bootstrap DateTime picker

  • Thursday, January 19, 2017
  • by qambar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 332 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 58 Forks
  • 0 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

This is a fork with delicious changes and library updates., (*1)

DatetimepickerBundle

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

Demo : http://www.malot.fr/bootstrap-datetimepicker/demo.php, (*3)

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

Installation

Step 1: Install DatetimepickerBundle

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

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

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

}, (*7)


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

Step 2: Enable the bundle

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

public function registerBundles() { $bundles = array( // ... new SC\DatetimepickerBundle\SCDatetimepickerBundle(), ); }, (*9)


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

Step 3: Initialize assets

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


## Usages ``` php <?php // ... public function buildForm(FormBuilder $builder, array $options) { $builder // defaut options ->add('createdAt', 'collot_datetime') // full options ->add('updatedAt', 'collot_datetime', array( 'pickerOptions' => array('format' => 'mm/dd/yyyy', 'weekStart' => 0, 'startDate' => date('m/d/Y'), //example 'endDate' => '01/01/3000', //example 'daysOfWeekDisabled' => '0,6', //example 'autoclose' => false, 'startView' => 'month', 'minView' => 'hour', 'maxView' => 'decade', 'todayBtn' => false, 'todayHighlight' => false, 'keyboardNavigation' => true, 'language' => 'en', 'forceParse' => true, 'minuteStep' => 5, 'pickerReferer ' => 'default', //deprecated 'pickerPosition' => 'bottom-right', 'viewSelect' => 'hour', 'showMeridian' => false, 'initialDate' => date('m/d/Y', 1577836800), //example ))) ; }

Add form_javascript and form_stylesheet, (*11)

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

Example:

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

{{ form_stylesheet(form) }}

{% endblock %}, (*14)

{% block javascripts %} , (*15)

{{ form_javascript(form) }}

{% endblock %}, (*16)

{% block body %}, (*17)

{{ form_widget(form) }}

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

Documentation

The documentation of the datetime picker is here : http://www.malot.fr/bootstrap-datetimepicker/#options, (*19)

Notes

The date format from php 'pickerOptions' => array('format'=>'dd MM yyyy - HH:ii p') is used to set automatically the date format of Symfony in order to make compatible Symfony and JavaScript output. But there are some problems for example with php MM which display "décembre" in PHP intl translation and "Decembre" in Bootstrap translation. That is why I edited js/locales/bootstrap-datetimepicker.fr.js, (*20)

The Versions

19/01 2017

dev-master

9999999-dev

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

19/01 2017

2.4

2.4.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

19/10 2015

2.3

2.3.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

18/10 2015

2.2

2.2.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

16/10 2015

2.1

2.1.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

15/10 2015

2.0

2.0.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

10/08 2015

1.4

1.4.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

24/07 2015

1.3

1.3.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

24/07 2015

1.2

1.2.0.0

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

bootstrap bundle symfony datepicker timepicker picker

29/06 2015

dev-datetimeinterface

dev-datetimeinterface

Symfony bundle for Bootstrap DateTime picker

  Sources   Download

MIT

The Requires

 

by Stephane Collot

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