Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mablae/datetimepickerbundle

A bootstrap DateTimePicker for symfony forms
https://github.com/mablae/datetimepickerbundle

bootstrap datepicker momentjs symfony-bundle

Last synced: 2 months ago
JSON representation

A bootstrap DateTimePicker for symfony forms

Awesome Lists containing this project

README

        

# DatetimepickerBundle

Warning: This is abadoned and incomplete! Uses at your own rik.

[![Packagist](https://img.shields.io/packagist/v/mablae/datetimepicker-bundle.svg)]()

This bundle implements the [Bootstrap DateTime Picker v4](http://eonasdan.github.io/bootstrap-datetimepicker/Installing/#bower-) in a Form Type for Symfony 2.*. The bundle structure is inspired by GenemuFormBundle.

Please feel free to contribute, to fork, to send merge request and to create ticket.

## Installation

### Step 1: Install DatetimepickerBundle

```bash
php composer.phar require mablae/datetimepicker-bundle
```

### Step 2: Enable the bundle

``` php
add('createdAt', DateTimeType::class)

// full options
->add('updatedAt', DateTimeType::class, array( 'pickerOptions' =>
array('format' => 'mm/dd/yyyy',
'viewMode' => 'days', // days, month, years, decades

)));

}
```

Include the javascript needed to initialize the widget:

``` jinja2

...
{{ form_javascript(your.form.field) }}
...

```