Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/simialbi/yii2-widget-datetimepicker

Datepicker widget for yii2 framework
https://github.com/simialbi/yii2-widget-datetimepicker

bootstrap3 bootstrap4 datepicker datetimepicker yii2 yii2-widgets

Last synced: 3 months ago
JSON representation

Datepicker widget for yii2 framework

Awesome Lists containing this project

README

        

# yii2-widget-datetimepicker
This extension provides a `date`, `time` or `datetime` picker widget for yii2 framework in **Bootstrap 4** style. It's based
on [Tempus Dominus](https://tempusdominus.github.io/bootstrap-4/).

## Resources
* [yii2](https://github.com/yiisoft/yii2) framework
* [Tempus Dominus](https://tempusdominus.github.io/bootstrap-4/)

## Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require --prefer-dist simialbi/yii2-widget-datetimepicker
```

or add

```
"simialbi/yii2-widget-datetimepicker": "~2.0"
```

to the ```require``` section of your `composer.json`

## Example Usage

To include datepicker instance in one of your pages, call the widget like this:
```php
title = 'myForm';
$this->params['breadcrumbs'][] = $this->title;

?>


'my-form']); ?>
= $form->field($model, 'name')->textInput(['autofocus' => true]) ?>
= $form->field($model, 'birthday')->widget(Datetimepicker::class, [
'format' => 'mm/dd/yyyy',
'type' => Datetimepicker::TYPE_COMPONENT_APPEND
]) ?>
= $form->field($model, 'email') ?>


```

## License

**yii2-widget-datetimepicker** is released under MIT license. See bundled [LICENSE](LICENSE) for details.