Skip to content

Commit

Permalink
Update to release v1.4.4 fix #154 fix #160 fix #161 fix #164 fix #165 f…
Browse files Browse the repository at this point in the history
…ix #166
  • Loading branch information
kartik-v committed Jul 13, 2018
1 parent a68e717 commit 39e0e71
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 35 deletions.
6 changes: 5 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ Change Log: `yii2-widget-datepicker`

## version 1.4.4

**Date:** 04-Sep-2017
**Date:** 13-Jul-2018

- (enh #168): Add Kazakh translations.
- (enh #166, #165): Simplify INLINE editor behavior.
- (enh #164, #161, #160): Remove interim z-index fix for BS modal dialog.
- (enh #154): Add support for jQuery 3.x - update source plugin to v1.8.0.
- (enh #150): Enhance to make `form-control` CSS class the default and yet optional.
- (enh #149): Add Finnish translations.

Expand Down
9 changes: 3 additions & 6 deletions DatePicker.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @package yii2-widgets
* @subpackage yii2-widget-datepicker
* @version 1.4.2
* @version 1.4.4
*/

namespace kartik\date;
Expand Down Expand Up @@ -414,7 +414,7 @@ protected function parseMarkup($input)
return Html::tag('div', $out, $this->_container);
case self::TYPE_INLINE:
Html::addCssClass($this->options, [$size, $disabled]);
return Html::tag('div', '', $this->_container) . $input;
return Html::tag('div', $input, $this->_container);
default:
return '';
}
Expand All @@ -439,9 +439,6 @@ public function registerAssets()
$input = "jQuery('#{$id}')";
$el = "jQuery('#" . $this->options['data-datepicker-source'] . "')";
$this->registerPlugin($this->pluginName, $el);
if ($this->type === self::TYPE_INLINE) {
$view->registerJs("{$el}.on('changeDate',function(e){{$input}.val(e.format()).trigger('change')});");
}
if ($this->_hasAddon && $this->removeButton !== false) {
$view->registerJs("initDPRemove('{$id}');");
}
Expand Down
2 changes: 1 addition & 1 deletion DatePickerAsset.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @package yii2-widgets
* @subpackage yii2-widget-datepicker
* @version 1.4.4
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 - 2017, Kartik Visweswaran
Copyright (c) 2014 - 2018, Kartik Visweswaran
Krajee.com
All rights reserved.

Expand Down
5 changes: 3 additions & 2 deletions assets/css/bootstrap-datepicker.css

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

2 changes: 1 addition & 1 deletion assets/css/bootstrap-datepicker.min.css

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

6 changes: 1 addition & 5 deletions assets/css/datepicker-kv.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @package yii2-widgets
* @subpackage yii2-widget-datepicker
* @version 1.4.4
Expand All @@ -10,10 +10,6 @@
* Author: Kartik Visweswaran
* For more Yii related demos visit http://demos.krajee.com
*/
.datepicker {
z-index: 1151 !important;
}

.input-group.date.disabled .input-group-addon .glyphicon {
cursor: not-allowed;
filter: alpha(opacity=65);
Expand Down
4 changes: 2 additions & 2 deletions assets/css/datepicker-kv.min.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @package yii2-widgets
* @subpackage yii2-widget-datepicker
* @version 1.4.4
Expand All @@ -9,4 +9,4 @@
*
* Author: Kartik Visweswaran
* For more Yii related demos visit http://demos.krajee.com
*/.datepicker{z-index:1151!important}.input-group.date.disabled .input-group-addon .glyphicon{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.input-group.date .input-group-addon{cursor:default}.input-group.date .kv-date-calendar,.input-group.date .kv-date-remove,.input-group.input-daterange .kv-date-calendar,.input-group.input-daterange .kv-date-remove{cursor:pointer}.input-group.input-daterange .input-group-addon{border-left:1px solid #ccc}.input-group.input-daterange .input-group-addon:last-child{border-right:1px solid #ccc}
*/.input-group.date.disabled .input-group-addon .glyphicon{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.input-group.date .input-group-addon{cursor:default}.input-group.date .kv-date-calendar,.input-group.date .kv-date-remove,.input-group.input-daterange .kv-date-calendar,.input-group.input-daterange .kv-date-remove{cursor:pointer}.input-group.input-daterange .input-group-addon{border-left:1px solid #ccc}.input-group.input-daterange .input-group-addon:last-child{border-right:1px solid #ccc}
23 changes: 14 additions & 9 deletions assets/js/bootstrap-datepicker.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*!
* Datepicker for Bootstrap v1.7.1 (https://github.com/uxsolutions/bootstrap-datepicker)
* Datepicker for Bootstrap v1.8.0 (https://github.com/uxsolutions/bootstrap-datepicker)
*
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/

(function(factory){
if (typeof define === "function" && define.amd) {
define(["jquery"], factory);
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof exports === 'object') {
factory(require('jquery'));
} else {
Expand Down Expand Up @@ -1141,10 +1141,6 @@
nextIsDisabled,
factor = 1;
switch (this.viewMode){
case 0:
prevIsDisabled = year <= startYear && month <= startMonth;
nextIsDisabled = year >= endYear && month >= endMonth;
break;
case 4:
factor *= 10;
/* falls through */
Expand All @@ -1156,7 +1152,11 @@
/* falls through */
case 1:
prevIsDisabled = Math.floor(year / factor) * factor <= startYear;
nextIsDisabled = Math.floor(year / factor) * factor + factor >= endYear;
nextIsDisabled = Math.floor(year / factor) * factor + factor > endYear;
break;
case 0:
prevIsDisabled = year <= startYear && month <= startMonth;
nextIsDisabled = year >= endYear && month >= endMonth;
break;
}

Expand Down Expand Up @@ -1532,6 +1532,11 @@
p.setRange(range);
});
},
clearDates: function(){
$.each(this.pickers, function(i, p){
p.clearDates();
});
},
dateUpdated: function(e){
// `this.updating` is a workaround for preventing infinite recursion
// between `changeDate` triggering and `setUTCDate` calling. Until
Expand Down Expand Up @@ -1998,7 +2003,7 @@

/* DATEPICKER VERSION
* =================== */
$.fn.datepicker.version = '1.7.1';
$.fn.datepicker.version = '1.8.0';

$.fn.datepicker.deprecated = function(msg){
var console = window.console;
Expand Down
8 changes: 3 additions & 5 deletions assets/js/bootstrap-datepicker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/datepicker-kv.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @package yii2-widgets
* @subpackage yii2-widget-datepicker
* @version 1.4.4
Expand Down
2 changes: 1 addition & 1 deletion assets/js/datepicker-kv.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2017
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @package yii2-widgets
* @subpackage yii2-widget-datepicker
* @version 1.4.4
Expand Down

0 comments on commit 39e0e71

Please sign in to comment.