PHPackages                             beweb/bootstrap-nette-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. [Templating &amp; Views](/categories/templating)
4. /
5. beweb/bootstrap-nette-datepicker

ActiveLibrary[Templating &amp; Views](/categories/templating)

beweb/bootstrap-nette-datepicker
================================

Datepicker for nette bootstrap form renderer

7483JavaScript

Since Dec 10Pushed 13y ago3 watchersCompare

[ Source](https://github.com/remism/bootstrap-nette-datepicker)[ Packagist](https://packagist.org/packages/beweb/bootstrap-nette-datepicker)[ RSS](/packages/beweb-bootstrap-nette-datepicker/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

bootstrap-nette-datepicker
==========================

[](#bootstrap-nette-datepicker)

A nette-bootstrap-datepicker based on

-  (original from Stefan Petre's )
-

\######1) See

\######2) Attach necessary files (jQuery, Twitter Bootstrap and netteForms are required)

```

```

You can attach language file.

```

```

Translantions can be downloaded from  or you can make you own.

\######3) Init datepickers

```
	$(document).ready(function () {
		$('.bootstrapDatePicker').datepicker();
	});

```

You can set your own class by

```
	setClassName('myBetterClass');

```

Then you should init datepicker using

```
	$(document).ready(function () {
		$('.myBetterClass').datepicker();
	});

```

When input has no button (see below) then bootstrapDatePicker class is added directly to input element. When button is on calendar input is wrrapped by div and bootstrapDatePicker class is added to this div. ######4) Add extension method to all form (date format and languge are set globally)

Use the same date format as in original js component (see )

```
\Nette\Forms\Container::extensionMethod(
  'addDatePicker', function (\Nette\Forms\Container $container, $name, $label = NULL) {
    return $container[$name] = new BeWeb\Components\Nette\BootstrapDatePicker('dd.mm.yyyy', 'cs', $label);
});

```

or simply

```
	BeWeb\Components\Nette\BootstrapDatePicker::register('dd.mm.yyyy', 'cs', 'addDatePicker');

```

or for default values ('yyyy-mm-dd', 'en', 'addDatePicker')

```
	BeWeb\Components\Nette\BootstrapDatePicker::register();

```

\######5) Usage

```
	$form->addDatePicker('date', "Date")
	->setClassName('myBetterClass')//'bootstrapDatePicker' defalt
	->setAutoclose(true)//true default
	->setTodayHighlight()//or setTodadyHighlight(true); false default
	->setWeekStart(1)//0 for Sunday, 6 for Saturday; 1 is default
	->setKeyboardNavigation()//or setKyeboardnavigation(true); true default
	->setTodayButton(\BeWeb\Components\Nette\BootstrapDatePicker::TODAY_BUTTON_TRUE)//TODAY_BUTTON_FALSE | TODAY_BUTTON_TRUE | TODAY_BUTTON_LINKED; TODAY_BUTTON_FALSE default
	->setStartview(\BeWeb\Components\Nette\BootstrapDatePicker::STARTVIEW_MONTH)//STARTVIEW_MONTH | STARTVIEW_YEAR | STARTVIEW_DECADE; STARTVIEW_MONTH default
	->setRequired()
	->setInputButtonStyle(\BeWeb\Components\Nette\BootstrapDatePicker::BUTTON_STYLE_ICON_RIGHT)//BUTTON_STYLE_ICON_LEFT | BUTTON_STYLE_ICON_RIGHT | BUTTON_STYLE_ICON_NONE; BUTTON_STYLE_ICON_RIGHT default
	->addCondition(Nette\Forms\Form::FILLED)
	->addRule(
		\BeWeb\Components\Nette\BootstrapDatePicker::DATE_RANGE,
		'Entered date is not within allowed range.',
		array(new DateTime('2012-10-02'),	null));

```

Alternatively you can use

```
  ->addRule(
		BeWeb\Components\Nette\BootstrapDatePicker::DATE_RANGE,
		'Entered date is not within allowed range.',
		array(new DateTime('2012-10-02'), null));

```

to set only calendar minimum (or only maximum). Datepicker will show only applicable dates. Value is checked on submit by javascript and then by php on server side.

Use BeWeb\\Components\\Nette\\BootstrapDatePicker::DATE\_RANGE to apply date range. \\Nette\\Forms\\Form::RANGE will not work

\######6) Control generates something like this

```

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/57e76ea2f70e97067eac1e04dd26b027ccb78edac73b70999dc20d8a9b19e760?d=identicon)[remism](/maintainers/remism)

---

Top Contributors

[![remism](https://avatars.githubusercontent.com/u/2753333?v=4)](https://github.com/remism "remism (11 commits)")

### Embed Badge

![Health badge](/badges/beweb-bootstrap-nette-datepicker/health.svg)

```
[![Health](https://phpackages.com/badges/beweb-bootstrap-nette-datepicker/health.svg)](https://phpackages.com/packages/beweb-bootstrap-nette-datepicker)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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