Skip to content

Commit 5fb9253

Browse files
committed
Upgrade to release v1.6.1
1 parent b5ea8c1 commit 5fb9253

13 files changed

+120
-236
lines changed

CHANGE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Version 1.6.1
2+
=============
3+
**Date:** 16-Feb-2015
4+
5+
- (enh #27): Correct initial value initialization for all cases.
6+
- (enh #28): Upgrade to latest release of bootstrap-daterangepicker plugin.
7+
- Set copyright year to current.
8+
19
Version 1.6.0
210
=============
311
**Date:** 12-Jan-2015

DateRangePicker.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
55
* @package yii2-date-range
6-
* @version 1.5.0
6+
* @version 1.6.1
77
*/
88

99
namespace kartik\daterange;
@@ -118,7 +118,7 @@ public function init()
118118
}
119119
$this->_format = ArrayHelper::getValue($this->pluginOptions, 'format', 'YYYY-MM-DD');
120120
$this->_separator = ArrayHelper::getValue($this->pluginOptions, 'separator', ' - ');
121-
if (!empty($this->value) && $this->hideInput) {
121+
if (!empty($this->value)) {
122122
$dates = explode($this->_separator, $this->value);
123123
if (count($dates) > 1) {
124124
$this->pluginOptions['startDate'] = $dates[0];

DateRangePickerAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
55
* @package yii2-date-range
6-
* @version 1.5.0
6+
* @version 1.6.1
77
*/
88

99
namespace kartik\daterange;

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014, Kartik Visweswaran
1+
Copyright (c) 2015, Kartik Visweswaran
22
Krajee.com
33
All rights reserved.
44

LanguageAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
55
* @package yii2-date-range
6-
* @version 1.5.0
6+
* @version 1.6.1
77
*/
88

99
namespace kartik\daterange;

MomentAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
55
* @package yii2-date-range
6-
* @version 1.5.0
6+
* @version 1.6.1
77
*/
88

99
namespace kartik\daterange;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Additional enhancements added for this widget (by Krajee):
2121
You can see detailed [documentation](http://demos.krajee.com/date-range) on usage of the extension.
2222

2323
### Latest Release
24-
The latest version of the extension is release v1.6.0. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-date-range/blob/master/CHANGE.md) for details of various releases.
24+
The latest version of the extension is release v1.6.1. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-date-range/blob/master/CHANGE.md) for details of various releases.
2525

2626
## Installation
2727

assets/css/daterangepicker.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/*!
22
* Stylesheet for the Date Range Picker, for use with Bootstrap 3.x
33
*
4-
* Copyright 2013 Dan Grossman ( http://www.dangrossman.info )
5-
* Licensed under the Apache License v2.0
6-
* http://www.apache.org/licenses/LICENSE-2.0
4+
* Copyright 2013-2015 Dan Grossman ( http://www.dangrossman.info )
5+
* Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
76
*
87
* Built for http://www.improvely.com
98
*/

assets/css/daterangepicker.min.css

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/daterangepicker.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
* @version: 1.3.16
2+
* @version: 1.3.17
33
* @author: Dan Grossman http://www.dangrossman.info/
4-
* @date: 2014-11-12
4+
* @date: 2014-11-25
55
* @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved.
6-
* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
6+
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
77
* @website: http://www.improvely.com/
88
*/
99

@@ -304,11 +304,11 @@
304304
//if no start/end dates set, check if an input element contains initial values
305305
if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {
306306
if ($(this.element).is('input[type=text]')) {
307-
var val = $(this.element).val(),
307+
var val = $(this.element).val(),
308308
split = val.split(this.separator);
309-
309+
310310
start = end = null;
311-
311+
312312
if (split.length == 2) {
313313
start = moment(split[0], this.format);
314314
end = moment(split[1], this.format);
@@ -604,6 +604,8 @@
604604
// Bind global datepicker mousedown for hiding and
605605
$(document)
606606
.on('mousedown.daterangepicker', this._outsideClickProxy)
607+
// also support mobile devices
608+
.on('touchend.daterangepicker', this._outsideClickProxy)
607609
// also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them
608610
.on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)
609611
// and also close when focus changes to outside the picker (eg. tabbing between controls)
@@ -618,6 +620,8 @@
618620
// if the page is clicked anywhere except within the daterangerpicker/button
619621
// itself then call this.hide()
620622
if (
623+
// ie modal dialog fix
624+
e.type == "focusin" ||
621625
target.closest(this.element).length ||
622626
target.closest(this.container).length ||
623627
target.closest('.calendar-date').length
@@ -765,6 +769,9 @@
765769
if (startDate.isAfter(endDate)) {
766770
var difference = this.endDate.diff(this.startDate);
767771
endDate = moment(startDate).add(difference, 'ms');
772+
if (this.maxDate && endDate.isAfter(this.maxDate)) {
773+
endDate = this.maxDate;
774+
}
768775
}
769776
this.startDate = startDate;
770777
this.endDate = endDate;
@@ -1023,7 +1030,7 @@
10231030
html += '<th></th>';
10241031

10251032
if (!minDate || minDate.isBefore(calendar.firstDay)) {
1026-
html += '<th class="prev available"><i class="fa fa-arrow-left icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>';
1033+
html += '<th class="prev available"><i class="fa fa-arrow-left icon icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>';
10271034
} else {
10281035
html += '<th></th>';
10291036
}
@@ -1036,7 +1043,7 @@
10361043

10371044
html += '<th colspan="5" class="month">' + dateHtml + '</th>';
10381045
if (!maxDate || maxDate.isAfter(calendar.lastDay)) {
1039-
html += '<th class="next available"><i class="fa fa-arrow-right icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>';
1046+
html += '<th class="next available"><i class="fa fa-arrow-right icon icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>';
10401047
} else {
10411048
html += '<th></th>';
10421049
}

0 commit comments

Comments
 (0)