Download the PHP package webcito/bs-datepicker without Composer
On this page you can find all versions of the php package webcito/bs-datepicker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download webcito/bs-datepicker
More information about webcito/bs-datepicker
Files in webcito/bs-datepicker
Download webcito/bs-datepicker
More information about webcito/bs-datepicker
Files in webcito/bs-datepicker
Vendor webcito
Package bs-datepicker
Short Description A lightweight jQuery datepicker based on Bootstrap 5, supporting single-date and range selection, inline or dropdown rendering, Intl-based localization, multi-month views, disabled date rules, and a small, clean API.
License MIT
Homepage https://github.com/ThomasDev-de/bs-datepicker
Package bs-datepicker
Short Description A lightweight jQuery datepicker based on Bootstrap 5, supporting single-date and range selection, inline or dropdown rendering, Intl-based localization, multi-month views, disabled date rules, and a small, clean API.
License MIT
Homepage https://github.com/ThomasDev-de/bs-datepicker
Please rate this library. Is it a good library?
Informations about the package bs-datepicker
bs-datepicker
A jQuery-based datepicker plugin with a Bootstrap look & feel.
Current version: 1.1.2
Highlights
- Single date and range selection
- Locale support (e.g.,
de-DE) including localized month and weekday names - Inline or dropdown rendering
- Week start Monday or Sunday
- Multi-month view (
months) with responsive layout (tiles wrap on small screens) - Improved mobile responsiveness for header, weekday labels, and year/decade grids
- Clickable header navigation with year and decade grids for fast jumps across many years
- Public method
setRange(boolean)to toggle range mode at runtime - Visible display as a clickable wrapper (no input) with calendar icon in dropdown mode; in inline mode no separate wrapper
- Configurable navigation and clear icons (Bootstrap Icons classes)
- Optional: disabled dates (before a date, after a date, individual dates)
- Subtle highlighting for selected days and ranges (Bootstrap 5.3 utilities)
Options
| Option | Type | Default | Description | |
|---|---|---|---|---|
locale |
string | de-DE |
Intl locale for month/weekday names and formatting | |
range |
boolean | false |
Enable range selection (start/end) | |
inline |
boolean | false |
Render inline (no dropdown) | |
startOnSunday |
boolean | false |
Start week on Sunday (else Monday) | |
autoClose |
boolean | true |
Close dropdown after pick (single) or after end (range) | |
format |
'locale' | 'iso' | function |
'locale' |
Output formatter for legacy/direct input mode | |
separator |
string | – |
Separator used for range text | |
zIndex |
number | 1080 |
z-index for dropdown panel | |
months |
number | 1 |
Number of months to render side by side | |
placeholder |
string | Select period |
Placeholder for visible display/inline output | |
icons.prevYear |
string | bi bi-chevron-double-left |
Icon (previous year) | |
icons.prev |
string | bi bi-chevron-left |
Icon (previous month) | |
icons.today |
string | bi bi-record-circle |
Icon (jump to today) | |
icons.next |
string | bi bi-chevron-right |
Icon (next month) | |
icons.nextYear |
string | bi bi-chevron-double-right |
Icon (next year) | |
icons.clear |
string | bi bi-x-lg |
Icon (clear selection) | |
classes.display |
string | form-control d-flex align-items-center justify-content-between |
Classes on the visible display wrapper (dropdown mode) | |
classes.displayText |
string | '' |
Classes on the text span | |
classes.displayIcon |
string | bi bi-calendar-event |
Classes on the icon | |
disabled.before |
Date | string | – | Disable all days <= date |
disabled.after |
Date | string | – | Disable all days >= date |
disabled.min |
Date | string | – | First allowed day |
disabled.max |
Date | string | – | Last allowed day |
disabled.dates |
(Date | string)[] | – | Individual disabled dates |
Methods
| Method | Signature | Returns | Description |
|---|---|---|---|
val |
val() |
string or [string,string] |
Getter: Single → ISO YYYY-MM-DD or ''; Range → [startISO, endISO] (empty strings when unset) |
val |
val(date) |
jQuery |
Setter (Single): accepts Date |string|null (ISO YYYY-MM-DD for strings). Disabled dates are ignored. |
val |
val(start, end) / val([start, end]) |
jQuery |
Setter (Range): accepts Date |string|null. Disabled dates are ignored independently. |
getDate |
getDate() |
Date | null or [Date,Date] |
Current selection (Range: only present edges) |
setDate |
setDate(Date | string | null) |
jQuery |
Set single date (disabled dates are purged) |
setDate |
setDate([start,end]) |
jQuery |
Set range (disabled dates are purged) |
destroy |
destroy() |
jQuery |
Destroy instance and remove DOM/listeners |
setDisableDates |
setDisableDates(config) |
jQuery |
Set disabled configuration at runtime; purges invalid selection |
getDisableDates |
getDisableDates() |
object | null |
Get current disabled config |
setMin |
setMin(date) |
jQuery |
Set min boundary; purges invalid selection |
setMax |
setMax(date) |
jQuery |
Set max boundary; purges invalid selection |
setMonth |
setMonth(count) |
jQuery |
Set the number of months to display simultaneously |
setViewMonth |
setViewMonth(date) |
jQuery |
Jump to a specific month/year without changing selection |
setRange |
setRange(boolean) |
jQuery |
Toggle between single and range selection at runtime; preserves selection as start/single |
setDisabled |
setDisabled(boolean) |
jQuery |
Toggle picker interaction; when true the dropdown cannot be opened |
clearDisableDates |
clearDisableDates() |
jQuery |
Remove all disabled rules |
setLocale |
setLocale(locale) |
jQuery |
Switch locale at runtime and re-render immediately |
Events (Namespace: bs.datepicker)
| Event | When | detail payload |
|---|---|---|
init.bs.datepicker |
After initialization | { range:boolean, inline:boolean, months:number } |
show.bs.datepicker |
Dropdown shown | {} |
hide.bs.datepicker |
Dropdown hidden | {} |
render.bs.datepicker |
After each render | { current:Date, range:boolean } |
navigate.bs.datepicker |
On nav/header buttons | { action:string, current:Date } where action is one of prev, next, prevYear, nextYear, today, zoomOut, selectYear, selectDecade |
changeDate.bs.datepicker |
Any selection change | Single: { value:Date |null }; Range: { value:[Date|null, Date|null] } |
clear.bs.datepicker |
On clear | {} (plus a changeDate with nulls) |
setLocale.bs.datepicker |
After setLocale |
{ locale:string } |
setDisableDates.bs.datepicker |
After setDisableDates |
{ disabled:object } |
setMin.bs.datepicker |
After setMin |
{ min:Date |null } |
setMax.bs.datepicker |
After setMax |
{ max:Date |null } |
setMonth.bs.datepicker |
After setMonth |
{ months:number } |
setViewMonth.bs.datepicker |
After setViewMonth |
{ current:Date } |
setRange.bs.datepicker |
After setRange |
{ range:boolean } |
setDisabled.bs.datepicker |
After setDisabled |
{ disabled:boolean } |
clearDisableDates.bs.datepicker |
After clearDisableDates |
{} |
Example (legacy – direct input)
Example (container mode – hidden inputs inside wrapper)
Disabled dates (change at runtime)
Notes
-
To display the icons you must include the Bootstrap Icons CSS, e.g.:
- The “Clear” button in the header clears the selection (single date or range). Hidden inputs are set to empty strings.
- Click the header title to switch from days to years, then to decades. Selecting a decade opens its years; selecting a year returns to the day view.
- In container mode, hidden inputs are always filled in ISO format
YYYY-MM-DD. The visible display shows localized, formatted values. - Disabled days are visually disabled and cannot be clicked. Navigation remains possible.
- Events are triggered on the container element (container mode) or on the input/anchor (legacy). You can access data via
e.detailor the 2nd handler argument.
All versions of bs-datepicker with dependencies
PHP Build Version
Package Version
Requires
components/jquery Version
^3
twbs/bootstrap Version v4.* | v5.*
twbs/bootstrap-icons Version ^1
twbs/bootstrap Version v4.* | v5.*
twbs/bootstrap-icons Version ^1
The package webcito/bs-datepicker contains the following files
Loading the files please wait ...