Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Ui date fix date parrse and refactor #164

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"package.json"
],
"dependencies": {
"angular": "^1.3.x",
"jquery-ui": "^1.9"
"angular": "~1.5.x",
"jquery-ui": "~1.11"
}
}
70 changes: 37 additions & 33 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>AngularUI - Date Picker Demo</title>
<base href=".."></base>
<!-- Styles -->
<link rel="stylesheet" href="bower_components/jquery-ui/themes/smoothness/jquery-ui.css">
</head>

<body ng-app="MyApp">
<!-- Date -->
<div ng-controller='MyCtrl'>
<form name="myForm">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>AngularUI - Date Picker Demo</title>
<base href="..">
<!-- Styles -->
<link rel="stylesheet" href="bower_components/jquery-ui/themes/smoothness/jquery-ui.css">
</head>

<body ng-app="MyApp">
<!-- Date -->
<div ng-controller='MyCtrl'>
<h2>Examples</h2>
<form name="myForm">

<h2>ui-date (binding options)</h2>
<fieldset>
<label for="date">Select Date:</label>
<input type="text" id="date" ui-date="dateOptions" ng-model="aDate">

<div>{{ aDate }}</div>
<div>
Read only <input type="text" ui-date ng-model="aDate" readonly>
Read only <input type="text" ui-date="dateOptions" ng-model="aDate" readonly>
</div>


<div class="field">
Required date: <input type="text" name="date2" required ui-date="" ng-model="reqDate">
Required date: <input type="text" name="date2" required ui-date ng-model="reqDate">
<div ng-if="myForm.date2.$error.required">
The required date field is required.
</div>
</div>
</form>

</div>
<!-- Scripts -->
<script type="text/javascript" src="bower_components/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="assets/date.js"></script>
<script>
angular.module('MyApp', ['ui.date'])
.controller('MyCtrl', function($scope) {
$scope.aDate = '2015-10-31';
$scope.dateOptions = {
dateFormat: 'dd.mm.yy',
}
})
</script>
</body>
</fieldset>


<!--<h2>ui-date (binding options)</h2>-->
<!--<fieldset>-->
<!---->
<!--</fieldset>-->


</form>

</div>
<!-- Scripts -->
<script type="text/javascript" src="bower_components/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="assets/date.js"></script>
</body>

</html>
13 changes: 13 additions & 0 deletions demo/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
angular.module('MyApp', ['ui.date'])
.controller('MyCtrl', function ($scope, $filter, $compile, $rootScope) {
// $scope.aDate = ;
// $scope.otherDate = 'Thursday, 11 October, 2012';
// $scope.otherDate = '2015-10-31';
// $scope.otherDate = $filter('date')((new Date("2014-08-20T00:00:00-04:00")).getTime(),'dd/MM/yyyy');
// $scope.otherDate = "2016-12-28T15:58:21.162000Z";
$scope.dateOptions = {
dateFormat: 'dd.mm.yy',
};


});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"datepicker"
],
"devDependencies": {
"angular": "^1.4.0",
"angular-mocks": "^1.4.0",
"angular": "^1.5.x",
"angular-mocks": "^1.5.0",
"babel-core": "6.3.15",
"babel-loader": "6.2.0",
"babel-preset-es2015": "6.3.13",
Expand All @@ -45,7 +45,7 @@
"expose-loader": "0.7.1",
"jasmine-core": "^2.4.1",
"jquery": "2.1.4",
"jquery-ui": "1.10.5",
"jquery-ui": "^1.10.5",
"karma": "^0.13.15",
"karma-chrome-launcher": "^0.2.2",
"karma-firefox-launcher": "^0.1.7",
Expand Down
Loading