Skip to content

Commit aa4ab21

Browse files
committedMar 29, 2019
fix setDate with inline option
1 parent 4ed13c6 commit aa4ab21

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed
 

‎CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
[1.3.3] - 2019-03-29
5+
* fixed bug #51
6+
47
[1.3.2] - 2019-03-25
58
* New option: `dropdowns`
69

‎css/lightpick.css

+5-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@
159159
}
160160

161161
.lightpick__day.is-today {
162-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle fill='rgba(220, 50, 47, 0.06)' cx='16' cy='16' r='16'/%3E%3C/svg%3E");
163-
background-size: 61.8% auto;
162+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle fill='rgba(220, 50, 47, .5)' cx='16' cy='16' r='16'/%3E%3C/svg%3E");
163+
background-size: 18.8% auto;
164+
background-position: center bottom;
164165
color: #DC322F;
165166
}
166167

@@ -235,6 +236,8 @@
235236
.lightpick__day.is-start-date:hover,
236237
.lightpick__day.is-end-date:hover {
237238
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle fill='%23268BD2' cx='16' cy='16' r='16'/%3E%3C/svg%3E");
239+
background-size: auto;
240+
background-position: center;
238241
color: #FFF;
239242
font-weight: bold;
240243
}

‎lightpick.js

+8
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,10 @@
10931093
if (!preventOnSelect && typeof this._opts.onSelect === 'function') {
10941094
this._opts.onSelect.call(this, this.getStartDate(), this.getEndDate());
10951095
}
1096+
1097+
if (this._opts.inline) {
1098+
updateDates(this.el, this._opts);
1099+
}
10961100
},
10971101

10981102
setEndDate: function(date, preventOnSelect)
@@ -1125,6 +1129,10 @@
11251129
if (!preventOnSelect && typeof this._opts.onSelect === 'function') {
11261130
this._opts.onSelect.call(this, this.getStartDate(), this.getEndDate());
11271131
}
1132+
1133+
if (this._opts.inline) {
1134+
updateDates(this.el, this._opts);
1135+
}
11281136
},
11291137

11301138
setDate: function(date)

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lightpick",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"description": "Javascript date range picker - lightweight, no jQuery",
55
"main": "lightpick.js",
66
"scripts": {

0 commit comments

Comments
 (0)
Please sign in to comment.