Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Conflicts:
	bower.json
  • Loading branch information
t1m0n committed May 16, 2016
2 parents f4fc099 + 3d554e5 commit 0c67a76
Show file tree
Hide file tree
Showing 50 changed files with 2,791 additions and 205 deletions.
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea
tests
docs
bower_components
bower.json
static-server.js
visual-tests.html
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Air Datepicker

Lightweight customizable cross-browser jQuery datepicker, built with es5 and css-flexbox. Works in all modern desktop and mobile browsers (tested no Android 4.4+ and iOS8+)
Lightweight customizable cross-browser jQuery datepicker, built with es5 and css-flexbox. Works in all modern desktop and mobile browsers (tested no Android 4.4+ and iOS8+).

![air datepicker image](https://github.com/t1m0n/air-datepicker/raw/master/docs/img/promo-img.png)

## Install

### bower
```
bower i --save air-datepicker
```
### npm
```
npm i --save air-datepicker
```

## Usage
```javascript
Expand All @@ -19,6 +26,21 @@ $('.my-datepicker').datepicker([options])

## Change log

### v2.0.0
* added timepicker (see [docs](http://t1m0n.name/air-datepicker/docs#timepicker) for more info)
* added possibility to set `Date` in `todayButton`
* global variable `Datepicker` has been removed, now all placed in `$.fn.datepicker`
* improved `selectDate` method, now one can pass an array of dates to select
* added `npm` package
* fixed issue caused by `placeholder` on `readonly` inputs in IE
* fixed issue when `range` is true and first selected date is bigger than second
* added new languages:
- `da` thanks to [bjarnef](https://github.com/bjarnef)
- `nl` thanks to [JaZo](https://github.com/JaZo)
- `pt` thanks to [cmpscabral](https://github.com/cmpscabral)
- `pt-BR` thanks to [dowglaz](https://github.com/dowglaz)
- `ro` thanks to [tourniquet](https://github.com/tourniquet)

### v1.2.4
* fixed '$ is not defined' problem.

Expand Down
16 changes: 9 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"name": "air-datepicker",
"version": "1.2.4",
"version": "2.0.0",
"authors": [
"t1m0n <[email protected]>"
],
"description": "A lightweight jQuery datepicker",
"description": "A lightweight, customizable, powerful jQuery datepicker",
"main": [
"dist/js/datepicker.js",
"dist/css/datepicker.css"
"dist/js/datepicker.min.js",
"dist/css/datepicker.min.css"
],
"keywords": [
"datepicker",
"calendar",
"lightweight"
"timepicker",
"plugin",
"customizable",
"powerful"
],
"license": "MIT",
"ignore": [
Expand All @@ -28,6 +30,6 @@
"tests"
],
"dependencies": {
"jquery": "~2.1.4"
"jquery": "^2.2.3"
}
}
267 changes: 247 additions & 20 deletions dist/css/datepicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,6 @@
background: none;
border: none; }

.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }

/* -------------------------------------------------
Datepicker cells
------------------------------------------------- */
Expand Down Expand Up @@ -184,6 +164,9 @@
position: absolute;
left: 0;
top: 0; }
@media print {
.datepickers-container {
display: none; } }

.datepicker {
background: #fff;
Expand Down Expand Up @@ -387,3 +370,247 @@
.datepicker--button:hover {
color: #4a4a4a;
background: #f0f0f0; }

.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }

/* -------------------------------------------------
Timepicker
------------------------------------------------- */
.datepicker--time {
border-top: 1px solid #efefef;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 4px;
position: relative; }
.datepicker--time.-am-pm- .datepicker--time-sliders {
-webkit-flex: 0 1 138px;
-ms-flex: 0 1 138px;
flex: 0 1 138px;
max-width: 138px; }

.datepicker--time-sliders {
-webkit-flex: 0 1 153px;
-ms-flex: 0 1 153px;
flex: 0 1 153px;
margin-right: 10px;
max-width: 153px; }

.datepicker--time-label {
display: none;
font-size: 12px; }

.datepicker--time-current {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
font-size: 14px;
text-align: center;
margin: 0 0 0 10px; }

.datepicker--time-current-colon {
margin: 0 2px 3px;
line-height: 1; }

.datepicker--time-current-hours,
.datepicker--time-current-minutes {
line-height: 1;
font-size: 19px;
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
position: relative;
z-index: 1; }
.datepicker--time-current-hours:after,
.datepicker--time-current-minutes:after {
content: '';
background: #f0f0f0;
border-radius: 4px;
position: absolute;
left: -2px;
top: -3px;
right: -2px;
bottom: -2px;
z-index: -1;
opacity: 0; }
.datepicker--time-current-hours.-focus-:after,
.datepicker--time-current-minutes.-focus-:after {
opacity: 1; }

.datepicker--time-current-ampm {
text-transform: uppercase;
-webkit-align-self: flex-end;
-ms-flex-item-align: end;
align-self: flex-end;
color: #9c9c9c;
margin-left: 6px;
font-size: 11px;
margin-bottom: 1px; }

.datepicker--time-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
font-size: 11px;
height: 17px;
background: linear-gradient(to right, #dedede, #dedede) left 50%/100% 1px no-repeat; }
.datepicker--time-row:first-child {
margin-bottom: 4px; }
.datepicker--time-row input[type='range'] {
background: none;
cursor: pointer;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
height: 100%;
padding: 0;
margin: 0;
-webkit-appearance: none; }
.datepicker--time-row input[type='range']::-webkit-slider-thumb {
-webkit-appearance: none; }
.datepicker--time-row input[type='range']::-ms-tooltip {
display: none; }
.datepicker--time-row input[type='range']:hover::-webkit-slider-thumb {
border-color: #b8b8b8; }
.datepicker--time-row input[type='range']:hover::-moz-range-thumb {
border-color: #b8b8b8; }
.datepicker--time-row input[type='range']:hover::-ms-thumb {
border-color: #b8b8b8; }
.datepicker--time-row input[type='range']:focus {
outline: none; }
.datepicker--time-row input[type='range']:focus::-webkit-slider-thumb {
background: #5cc4ef;
border-color: #5cc4ef; }
.datepicker--time-row input[type='range']:focus::-moz-range-thumb {
background: #5cc4ef;
border-color: #5cc4ef; }
.datepicker--time-row input[type='range']:focus::-ms-thumb {
background: #5cc4ef;
border-color: #5cc4ef; }
.datepicker--time-row input[type='range']::-webkit-slider-thumb {
box-sizing: border-box;
height: 12px;
width: 12px;
border-radius: 3px;
border: 1px solid #dedede;
background: #fff;
cursor: pointer;
transition: background .2s; }
.datepicker--time-row input[type='range']::-moz-range-thumb {
box-sizing: border-box;
height: 12px;
width: 12px;
border-radius: 3px;
border: 1px solid #dedede;
background: #fff;
cursor: pointer;
transition: background .2s; }
.datepicker--time-row input[type='range']::-ms-thumb {
box-sizing: border-box;
height: 12px;
width: 12px;
border-radius: 3px;
border: 1px solid #dedede;
background: #fff;
cursor: pointer;
transition: background .2s; }
.datepicker--time-row input[type='range']::-webkit-slider-thumb {
margin-top: -6px; }
.datepicker--time-row input[type='range']::-webkit-slider-runnable-track {
border: none;
height: 1px;
cursor: pointer;
color: transparent;
background: transparent; }
.datepicker--time-row input[type='range']::-moz-range-track {
border: none;
height: 1px;
cursor: pointer;
color: transparent;
background: transparent; }
.datepicker--time-row input[type='range']::-ms-track {
border: none;
height: 1px;
cursor: pointer;
color: transparent;
background: transparent; }
.datepicker--time-row input[type='range']::-ms-fill-lower {
background: transparent; }
.datepicker--time-row input[type='range']::-ms-fill-upper {
background: transparent; }
.datepicker--time-row span {
padding: 0 12px; }

.datepicker--time-icon {
color: #9c9c9c;
border: 1px solid;
border-radius: 50%;
font-size: 16px;
position: relative;
margin: 0 5px -1px 0;
width: 1em;
height: 1em; }
.datepicker--time-icon:after, .datepicker--time-icon:before {
content: '';
background: currentColor;
position: absolute; }
.datepicker--time-icon:after {
height: .4em;
width: 1px;
left: calc(50% - 1px);
top: calc(50% + 1px);
-webkit-transform: translateY(-100%);
transform: translateY(-100%); }
.datepicker--time-icon:before {
width: .4em;
height: 1px;
top: calc(50% + 1px);
left: calc(50% - 1px); }

.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }
2 changes: 1 addition & 1 deletion dist/css/datepicker.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 0c67a76

Please sign in to comment.