PHPackages                             kartik-v/yii2-widget-datepicker - 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. kartik-v/yii2-widget-datepicker

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

kartik-v/yii2-widget-datepicker
===============================

Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).

v1.4.8(4y ago)1097.0M↓14.1%91[5 issues](https://github.com/kartik-v/yii2-widget-datepicker/issues)[1 PRs](https://github.com/kartik-v/yii2-widget-datepicker/pulls)20BSD-3-ClausePHP

Since Nov 8Pushed 2y ago14 watchersCompare

[ Source](https://github.com/kartik-v/yii2-widget-datepicker)[ Packagist](https://packagist.org/packages/kartik-v/yii2-widget-datepicker)[ Docs](https://github.com/kartik-v/yii2-widget-datepicker)[ RSS](/packages/kartik-v-yii2-widget-datepicker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (22)Used By (20)

 [ ![Krajee Logo](https://camo.githubusercontent.com/4addfbb3869c3fc7d79befea4f06d9cf3655a686fb503df0da1d725859cfdef9/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f6b72616a65652d6c6f676f2d622e706e67) ](http://demos.krajee.com "Krajee Demos")
 yii2-widget-datepicker ---

 [![Donate](https://camo.githubusercontent.com/0336bc43d88554a3f2d6c74dddf312bc2c65c2eacca70d83ae40f5567098d00e/68747470733a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal") [![kartikv](https://camo.githubusercontent.com/0cf29a542375e1a46e84d8bf5805a4e5c0a6ee98b6547ccdc0c55eed49d99c69/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d79656c6c6f772e706e67)](https://www.buymeacoffee.com/kartikv "Buy me a coffee")
=========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-widget-datepicker------------------)

[![Stable Version](https://camo.githubusercontent.com/69873d5614828a392fdd9daeda9208d02558aa410dc47942713250e06aedcd22/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d646174657069636b65722f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-datepicker)[![Untable Version](https://camo.githubusercontent.com/43d5ee74b5f9ba3c2c5d0639f83311906c839e3789d2a75bc7bb02e200b18bce/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d646174657069636b65722f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-datepicker)[![License](https://camo.githubusercontent.com/aa0335ee3c11769c4ce9235894e6b6e79cf7eadb3646af587cdaf174b517f493/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d646174657069636b65722f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-widget-datepicker)[![Total Downloads](https://camo.githubusercontent.com/5d4ca080cbefeecbab6b90989cee2d412cb7e9afd7af65621c50cb003322a4f7/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d646174657069636b65722f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-widget-datepicker)[![Monthly Downloads](https://camo.githubusercontent.com/728f49aa6ef860990a5597d8e190b33b75a16b57343f89e84e337f1cb306d14f/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d646174657069636b65722f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-widget-datepicker)[![Daily Downloads](https://camo.githubusercontent.com/50d49c90913e03336d162e44e9659919c67baf64f5901ace4cc4c0ccf95677eb/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d646174657069636b65722f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-widget-datepicker)

The DatePicker widget is a Yii 2 wrapper for the [Bootstrap DatePicker plugin](http://eternicode.github.io/bootstrap-datepicker) with various enhancements. The plugin is a fork of Stefan Petre's DatePicker (of eyecon.ro), with improvements by @eternicode. The widget is specially styled for Bootstrap 3 and Bootstrap 4 for Yii 2 Framework. The widget allows graceful degradation to a normal HTML text input, if the browser does not support JQuery. The widget supports these markups:

- Simple Input Markup
- Component Markup - Addon Prepended
- Component Markup - Addon Appended
- Inline / Embedded Markup
- Date Range Markup (from and to dates)
- Solo Button Markup

> NOTE: This extension is a sub repo split of [yii2-widgets](https://github.com/kartik-v/yii2-widgets). The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of [yii2-widgets](http://demos.krajee.com/widgets).

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/kartik-v/yii2-widget-datepicker/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

To install, either run

```
$ php composer.phar require kartik-v/yii2-widget-datepicker "@dev"

```

or add

```
"kartik-v/yii2-widget-datepicker": "@dev"

```

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

Release Changes
---------------

[](#release-changes)

> NOTE: Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-datepicker/blob/master/CHANGE.md) for details on changes to various releases.

Demo
----

[](#demo)

You can refer detailed [documentation and demos](http://demos.krajee.com/widget-details/datepicker) on usage of the extension.

Usage
-----

[](#usage)

```
use kartik\date\DatePicker;

// usage without model
echo 'Check Issue Date';
echo DatePicker::widget([
	'name' => 'check_issue_date',
	'value' => date('d-M-Y', strtotime('+2 days')),
	'options' => ['placeholder' => 'Select issue date ...'],
	'pluginOptions' => [
		'format' => 'dd-M-yyyy',
		'todayHighlight' => true
	]
]);
```

License
-------

[](#license)

**yii2-widget-datepicker** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity62

Solid adoption and visibility

Community45

Growing community involvement

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 73.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~127 days

Recently: every ~378 days

Total

21

Last Release

1664d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3592619?v=4)[Kartik Visweswaran](/maintainers/kartik-v)[@kartik-v](https://github.com/kartik-v)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (118 commits)")[![vishuB](https://avatars.githubusercontent.com/u/13677102?v=4)](https://github.com/vishuB "vishuB (7 commits)")[![kenjebaev](https://avatars.githubusercontent.com/u/20373911?v=4)](https://github.com/kenjebaev "kenjebaev (5 commits)")[![lourdas](https://avatars.githubusercontent.com/u/397916?v=4)](https://github.com/lourdas "lourdas (3 commits)")[![karpy47](https://avatars.githubusercontent.com/u/8948719?v=4)](https://github.com/karpy47 "karpy47 (2 commits)")[![dogrocker](https://avatars.githubusercontent.com/u/8379027?v=4)](https://github.com/dogrocker "dogrocker (2 commits)")[![deividas1](https://avatars.githubusercontent.com/u/12512225?v=4)](https://github.com/deividas1 "deividas1 (2 commits)")[![giannisdag](https://avatars.githubusercontent.com/u/2151129?v=4)](https://github.com/giannisdag "giannisdag (1 commits)")[![itzen](https://avatars.githubusercontent.com/u/8614041?v=4)](https://github.com/itzen "itzen (1 commits)")[![kullarkert](https://avatars.githubusercontent.com/u/195263?v=4)](https://github.com/kullarkert "kullarkert (1 commits)")[![kurrata-bit](https://avatars.githubusercontent.com/u/234404493?v=4)](https://github.com/kurrata-bit "kurrata-bit (1 commits)")[![larnu](https://avatars.githubusercontent.com/u/1165592?v=4)](https://github.com/larnu "larnu (1 commits)")[![lukascernydis](https://avatars.githubusercontent.com/u/3111717?v=4)](https://github.com/lukascernydis "lukascernydis (1 commits)")[![maxxer](https://avatars.githubusercontent.com/u/240201?v=4)](https://github.com/maxxer "maxxer (1 commits)")[![ovidiupop](https://avatars.githubusercontent.com/u/1079754?v=4)](https://github.com/ovidiupop "ovidiupop (1 commits)")[![RichWeber](https://avatars.githubusercontent.com/u/1702252?v=4)](https://github.com/RichWeber "RichWeber (1 commits)")[![rifkiaputri](https://avatars.githubusercontent.com/u/5754243?v=4)](https://github.com/rifkiaputri "rifkiaputri (1 commits)")[![softark](https://avatars.githubusercontent.com/u/342857?v=4)](https://github.com/softark "softark (1 commits)")[![syedmuneer](https://avatars.githubusercontent.com/u/19424588?v=4)](https://github.com/syedmuneer "syedmuneer (1 commits)")[![udokmeci](https://avatars.githubusercontent.com/u/8896298?v=4)](https://github.com/udokmeci "udokmeci (1 commits)")

---

Tags

pluginjquerydateyii2extensionwidgetformpickerselect2

### Embed Badge

![Health badge](/badges/kartik-v-yii2-widget-datepicker/health.svg)

```
[![Health](https://phpackages.com/badges/kartik-v-yii2-widget-datepicker/health.svg)](https://phpackages.com/packages/kartik-v-yii2-widget-datepicker)
```

###  Alternatives

[kartik-v/yii2-widget-datetimepicker

Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin (sub repo split from yii2-widgets)

1036.5M47](/packages/kartik-v-yii2-widget-datetimepicker)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)[kartik-v/yii2-widget-select2

Enhanced Yii2 wrapper for the Select2 jQuery plugin (sub repo split from yii2-widgets).

3279.7M191](/packages/kartik-v-yii2-widget-select2)[kartik-v/yii2-widget-depdrop

Widget that enables setting up dependent dropdowns with nested dependencies (sub repo split from yii2-widgets)

814.9M18](/packages/kartik-v-yii2-widget-depdrop)[kartik-v/yii2-widget-typeahead

Enhanced Yii2 wrapper for the Twitter Typeahead plugin (sub repo split from yii2-widgets).

454.8M9](/packages/kartik-v-yii2-widget-typeahead)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
