Skip to content

Commit

Permalink
Upgrade to release v1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Feb 16, 2015
1 parent b5ea8c1 commit 5fb9253
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 236 deletions.
8 changes: 8 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 1.6.1
=============
**Date:** 16-Feb-2015

- (enh #27): Correct initial value initialization for all cases.
- (enh #28): Upgrade to latest release of bootstrap-daterangepicker plugin.
- Set copyright year to current.

Version 1.6.0
=============
**Date:** 12-Jan-2015
Expand Down
6 changes: 3 additions & 3 deletions DateRangePicker.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
* @package yii2-date-range
* @version 1.5.0
* @version 1.6.1
*/

namespace kartik\daterange;
Expand Down Expand Up @@ -118,7 +118,7 @@ public function init()
}
$this->_format = ArrayHelper::getValue($this->pluginOptions, 'format', 'YYYY-MM-DD');
$this->_separator = ArrayHelper::getValue($this->pluginOptions, 'separator', ' - ');
if (!empty($this->value) && $this->hideInput) {
if (!empty($this->value)) {
$dates = explode($this->_separator, $this->value);
if (count($dates) > 1) {
$this->pluginOptions['startDate'] = $dates[0];
Expand Down
4 changes: 2 additions & 2 deletions DateRangePickerAsset.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
* @package yii2-date-range
* @version 1.5.0
* @version 1.6.1
*/

namespace kartik\daterange;
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014, Kartik Visweswaran
Copyright (c) 2015, Kartik Visweswaran
Krajee.com
All rights reserved.

Expand Down
4 changes: 2 additions & 2 deletions LanguageAsset.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
* @package yii2-date-range
* @version 1.5.0
* @version 1.6.1
*/

namespace kartik\daterange;
Expand Down
4 changes: 2 additions & 2 deletions MomentAsset.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
* @package yii2-date-range
* @version 1.5.0
* @version 1.6.1
*/

namespace kartik\daterange;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Additional enhancements added for this widget (by Krajee):
You can see detailed [documentation](http://demos.krajee.com/date-range) on usage of the extension.

### Latest Release
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.
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.

## Installation

Expand Down
5 changes: 2 additions & 3 deletions assets/css/daterangepicker.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*!
* Stylesheet for the Date Range Picker, for use with Bootstrap 3.x
*
* Copyright 2013 Dan Grossman ( http://www.dangrossman.info )
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
* Copyright 2013-2015 Dan Grossman ( http://www.dangrossman.info )
* Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
*
* Built for http://www.improvely.com
*/
Expand Down
5 changes: 2 additions & 3 deletions assets/css/daterangepicker.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions assets/js/daterangepicker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* @version: 1.3.16
* @version: 1.3.17
* @author: Dan Grossman http://www.dangrossman.info/
* @date: 2014-11-12
* @date: 2014-11-25
* @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved.
* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
* @website: http://www.improvely.com/
*/

Expand Down Expand Up @@ -304,11 +304,11 @@
//if no start/end dates set, check if an input element contains initial values
if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {
if ($(this.element).is('input[type=text]')) {
var val = $(this.element).val(),
var val = $(this.element).val(),
split = val.split(this.separator);

start = end = null;

if (split.length == 2) {
start = moment(split[0], this.format);
end = moment(split[1], this.format);
Expand Down Expand Up @@ -604,6 +604,8 @@
// Bind global datepicker mousedown for hiding and
$(document)
.on('mousedown.daterangepicker', this._outsideClickProxy)
// also support mobile devices
.on('touchend.daterangepicker', this._outsideClickProxy)
// also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them
.on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)
// and also close when focus changes to outside the picker (eg. tabbing between controls)
Expand All @@ -618,6 +620,8 @@
// if the page is clicked anywhere except within the daterangerpicker/button
// itself then call this.hide()
if (
// ie modal dialog fix
e.type == "focusin" ||
target.closest(this.element).length ||
target.closest(this.container).length ||
target.closest('.calendar-date').length
Expand Down Expand Up @@ -765,6 +769,9 @@
if (startDate.isAfter(endDate)) {
var difference = this.endDate.diff(this.startDate);
endDate = moment(startDate).add(difference, 'ms');
if (this.maxDate && endDate.isAfter(this.maxDate)) {
endDate = this.maxDate;
}
}
this.startDate = startDate;
this.endDate = endDate;
Expand Down Expand Up @@ -1023,7 +1030,7 @@
html += '<th></th>';

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

html += '<th colspan="5" class="month">' + dateHtml + '</th>';
if (!maxDate || maxDate.isAfter(calendar.lastDay)) {
html += '<th class="next available"><i class="fa fa-arrow-right icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>';
html += '<th class="next available"><i class="fa fa-arrow-right icon icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>';
} else {
html += '<th></th>';
}
Expand Down
8 changes: 4 additions & 4 deletions assets/js/daterangepicker.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 5fb9253

Please sign in to comment.