PHPackages                             my6uot9/yii2-flatpickr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. my6uot9/yii2-flatpickr

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

my6uot9/yii2-flatpickr
======================

Datetime picker widget for Yii2 framework

3.2.6(6y ago)3127BSD-3-ClausePHP

Since May 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/My6UoT9/yii2-flatpickr)[ Packagist](https://packagist.org/packages/my6uot9/yii2-flatpickr)[ RSS](/packages/my6uot9-yii2-flatpickr/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (16)Used By (0)

Yii2 Flatpickr (fork of mix8872/yii2-flatpickr)
===============================================

[](#yii2-flatpickr-fork-of-mix8872yii2-flatpickr)

[![Packagist](https://camo.githubusercontent.com/2db3742d0bbdf4dc9edd1fe2fd315cad3741c9ad3d5ae5364b85e42b691ec40c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d7936756f74392f796969322d666c61747069636b72)](https://packagist.org/packages/my6uot9/yii2-flatpickr)[![Packagist](https://camo.githubusercontent.com/986f7380082d9d3d6776ed24dcf7aefcae2181645a12ad83070e9dfe4eed49a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d7936756f74392f796969322d666c61747069636b72)](https://packagist.org/packages/my6uot9/yii2-flatpickr)[![Packagist](https://camo.githubusercontent.com/4c1aec2940ba0cfd617c562de1603f82ef168e612091c5fbe6b6b8c65fdc8932/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d7936756f74392f796969322d666c61747069636b72)](https://packagist.org/packages/my6uot9/yii2-flatpickr)

[Flatpickr](https://chmln.github.io/flatpickr/) is a lightweight and powerful datetime picker.

Changes from mix8872/yii2-flatpickr
-----------------------------------

[](#changes-from-mix8872yii2-flatpickr)

- Dropped asset-packagist, only use npm To be able to use `composer install` in this standalone yii2-flatpickr, add to composer.json:

    ```

        "replace": {
            "bower-asset/jquery": "*",
            "bower-asset/inputmask": "*",
            "bower-asset/punycode": "*",
            "bower-asset/yii2-pjax": "*"
        }

    ```

    That tells composer, that those packages are already provided. Thus effectively preventing them from installing.
- Replaced glyphicons with fontawesome

Installation
------------

[](#installation)

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

Either run

```
composer require --prefer-dist my6uot9/yii2-flatpickr "^3.0.0"
```

or add

```
"my6uot9/yii2-flatpickr": "^3.0.0"

```

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

Installation of Assets
----------------------

[](#installation-of-assets)

The preferred way to install the required assets is through [nodejs](https://nodejs.org/).

```
npm install flatpickr@^4.6.3
```

or add

```
 "flatpickr": "^4.6.3"

```

to the dependencies section of your `package.json` file.

Usage
-----

[](#usage)

By default the confirmDate plugin is active and configured like this:

```
    'plugins' => [
         'confirmDate' => [
               'confirmIcon'=> "",
               'confirmText' => 'OK',
               'showAlways' => false,
               'theme' => 'light',
         ],
    ],

```

Visit  for more plugins and config infos.

- The locale is automatically set to `strtolower(substr(Yii::$app->language, 0, 2));`.
    It can be overwritten by setting `locale` directly.
- Only one theme can be used at a time,

```
