mirror of
https://github.com/wassname/angular-timezone-selector.git
synced 2026-06-27 17:47:05 +08:00
Updated README, removed old example file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Timezone selector for Angular JS
|
||||
|
||||
A simple AngularJS directive to create timezone select. It uses [chosen](harvesthq.github.io/chosen/) to create auto-complete timezone select. Timezone information comes from [moment](http://momentjs.com/timezone/). Countries timezone data comes from [TimezoneDB](http://timezonedb.com/download).
|
||||
A simple AngularJS directive to create timezone select. It uses [chosen](http://harvesthq.github.io/chosen/) to create auto-complete timezone select. Timezone information comes from [moment](http://momentjs.com/timezone/). Countries timezone data comes from [TimezoneDB](http://timezonedb.com/download).
|
||||
|
||||
The user is able to choose their timezone by either typing the name of their country, or the name of the timezone directly.
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en" data-ng-app="timezoneSelectExample">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Angular timezone select example</title>
|
||||
<link rel="stylesheet" href="./bower_components/select2/select2.css">
|
||||
<style>
|
||||
.timezone-select {
|
||||
min-width: 300px;
|
||||
}
|
||||
</style>
|
||||
<script src="./bower_components/jquery/dist/jquery.js"></script>
|
||||
<script src="./bower_components/angular/angular.js"></script>
|
||||
<script src="./bower_components/lodash/dist/lodash.js"></script>
|
||||
<script src="./bower_components/select2/select2.js"></script>
|
||||
<script src="./bower_components/moment/min/moment.min.js"></script>
|
||||
<script src="./bower_components/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
|
||||
<script src="./dist/angular-timezone-select.js"></script>
|
||||
<script type="text/javascript">
|
||||
angular.module('timezoneSelectExample', ['angular-timezone-select'])
|
||||
.controller('TimezoneSelectCtrl', ['$scope', function($scope) {
|
||||
$scope.country = 'CN';
|
||||
}]);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div data-ng-controller="TimezoneSelectCtrl">
|
||||
Country:
|
||||
<select data-ng-model="country">
|
||||
<option value="CN">China</option>
|
||||
<option value="NZ">New Zealand</option>
|
||||
</select>
|
||||
Timezone:
|
||||
<input class="timezone-select" timezone-select data-ng-model="timezone" country="country">
|
||||
<div>Selected: {{ timezone }}</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "angular-timezone-selector",
|
||||
"version": "1.0.1",
|
||||
"description": "AngularJS timezone select",
|
||||
"description": "AngularJS timezone selector",
|
||||
"main": "dist/angular-timezone-selector.min.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
Reference in New Issue
Block a user