samuelnygaard / ng2-timezone-selector

A simple Angular module to create a timezone selector using moment-timezone.
https://samuelnygaard.github.io/ng2-timezone-selector/
MIT License
12 stars 12 forks source link

Initialize the default value for timezone #10

Open baontvn opened 6 years ago

baontvn commented 6 years ago

Hi there,

I am facing the issue when I try to set the default value for timezone or use the property guess=true. It displays the issue as below: display dev-tool As I checked the source code, the logic of the function triggerChangeEvent has a problem. this.countryChange.emit(this.allTimezones.find(function (x) { return x.zones.indexOf(_this.currentTimezone) >= 0; }) .iso); This line of code is not working. Please check my issue. Thank you. :)

vasudamera commented 6 years ago

i am also facing same problem,, --- guess="true"--- is not working. if i use guess="true" same error is occured ,, is there any dependency ?? thanks in advance