Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

My Javascript project - Timezone converter using moment.js

Just finished the jQuery and Javascript tutorials and thought I'd make something. It's simple in design, but it implements moment.js and timezones.js to accurately convert dates and times from your local time into another timezone.

Fork: https://teamtreehouse.com/workspaces/5078872

Snapshot: https://w.trhou.se/2d0a6n2oc8

The hard part for me was implementing the names of the time zones into the drop down menu. I'm not sure I did it in the most elegant way, but its functional and if anyone can give feedback on line 3 of 'app.js' that would be great.

Let me know what you think, thanks!

2 Answers

Showing a lot of data is sometimes hard to do. It looks like you have something that functions the way it needs to. I have a small suggestion, it might be nice to prepend the dropdown list with commonly used countries first. This way you can try to make it so the majority of your users will not have to scroll too far. Another solution might be that you have an auto fill feature. Instead of a dropdown for country use a text box that when the user starts to type, you could drop a few list items of countries that start with the letters the user has already entered.

Hey Jason, thanks for the input. The drop down list definitely needs to be cleaned up and having a top group with frequently used time zones would be easier on the eyes. The suggestion about the auto fill feature is what I'm most interested in. What technology would you suggest for that? I just started on the Angular course and it looks like that may be the way to go. What do you think?

There is at least one already built if you want to go that route. Most recently I used this one: https://github.com/darylrowland/angucomplete

This looks useful. Thanks!