angular-timezone
v1.0.4
Published
Timezone
Downloads
59
Maintainers
Readme
Timezone
This is a small json file which containes different timezone of the world.
timezone json file
A small utility timezone json file which is used to bind timezone in a select control.
Installation instruction
In this section, I am going to explain how to install and use timezone package
npm install angular-timezone --save
Please follow below instruction to use the package
How to use?
// in your component where you want to bind timezones
var timezonesjson = require('angular-timezone/timezones.json');
// in your component ts file
ngOnInit(){
this.timeZones = timezonesjson
}
// in your component html file
<select class="form-control" [(ngModel)]="myTimeZone">
<option value="N/A">--select timezone--</option>
<option *ngFor="let timezone of timeZones" value="{{timezone.text}}">{{timezone.text}}</option>
</select>