Skip to content

Commit

Permalink
Packing v0.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
indrimuska committed Feb 26, 2017
1 parent 0550250 commit ba71d20
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-moment-picker",
"version": "0.9.6",
"version": "0.9.7",
"authors": [
"Indri Muska <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-moment-picker.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Angular Moment Picker - v0.9.6 - http://indrimuska.github.io/angular-moment-picker - (c) 2015 Indri Muska - MIT */
/*! Angular Moment Picker - v0.9.7 - http://indrimuska.github.io/angular-moment-picker - (c) 2015 Indri Muska - MIT */
.moment-picker {
position: relative;
display: block;
Expand Down
18 changes: 7 additions & 11 deletions dist/angular-moment-picker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Angular Moment Picker - v0.9.6 - http://indrimuska.github.io/angular-moment-picker - (c) 2015 Indri Muska - MIT */
/*! Angular Moment Picker - v0.9.7 - http://indrimuska.github.io/angular-moment-picker - (c) 2015 Indri Muska - MIT */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
Expand Down Expand Up @@ -391,6 +391,8 @@
if (nextView < 0 || nextView > maxView) {
utility_1.setValue($scope.view.moment, $scope, $ctrl, $attrs);
$scope.view.update();
if ($attrs['ngModel'])
$ctrl.$commitViewValue();
if ($scope.autoclose)
_this.$timeout($scope.view.close);
}
Expand Down Expand Up @@ -435,14 +437,8 @@
// properties listeners
if ($attrs['ngModel'] != $attrs['momentPicker'])
$scope.$watch('value', function (newValue, oldValue) {
if (newValue !== oldValue) {
var oldModelValue_1 = angular.copy($ctrl.$modelValue);
if (newValue !== oldValue)
utility_1.setValue(newValue, $scope, $ctrl, $attrs);
if (angular.isFunction($scope.change)) {
var newModelValue_1 = angular.copy($ctrl.$modelValue);
_this.$timeout(function () { return $scope.change({ newValue: newModelValue_1, oldValue: oldModelValue_1 }); }, 0, false);
}
}
});
$scope.$watch(function () { return utility_1.momentToValue($ctrl.$modelValue, $scope.format); }, function (newViewValue, oldViewValue) {
if (newViewValue == oldViewValue)
Expand All @@ -454,12 +450,12 @@
$scope.view.update();
$scope.view.render();
if (angular.isFunction($scope.change)) {
var oldModelValue_2 = utility_1.valueToMoment(oldViewValue, $scope);
_this.$timeout(function () { return $scope.change({ newValue: newModelValue, oldValue: oldModelValue_2 }); }, 0, false);
var oldModelValue_1 = utility_1.valueToMoment(oldViewValue, $scope);
$scope.$evalAsync(function () { return $scope.change({ newValue: newModelValue, oldValue: oldModelValue_1 }); });
}
});
$scope.$watch(function () { return $ctrl.$modelValue && $ctrl.$modelValue.valueOf(); }, function () {
var viewMoment = ($ctrl.$modelValue || moment().locale($scope.locale)).clone();
var viewMoment = (utility_1.isValidMoment($ctrl.$modelValue) ? $ctrl.$modelValue : moment().locale($scope.locale)).clone();
if (!viewMoment.isSame($scope.view.moment)) {
$scope.view.moment = viewMoment;
$scope.view.update();
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-moment-picker.min.css

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

4 changes: 2 additions & 2 deletions dist/angular-moment-picker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-moment-picker",
"version": "0.9.6",
"version": "0.9.7",
"description": "Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js",
"main": "dist/angular-moment-picker.js",
"repository": {
Expand Down

0 comments on commit ba71d20

Please sign in to comment.