Search js (possibly jQuery) timezone (only) control widget UI

I was looking for javascript (hopefully jQuery) timezone / picker / control widget that I can include in my social app / router event.

Given that the usual drop-down menus indicate about 400 cities, I was hoping that someone would pity the poor user and come with a nice user widget with a better interface before I create it myself. (I saw some good examples of websites that use the map to select the time zone, but they take up too much real estate on the page of my application.)

Although there are several ways to list time zones other than GMT offset, I believe that the best way to organize time zones is to use a hierarchical drop-down menu with a submenu. Then I would list by continent, and then a submenu to list both countries and major cities and possibly exceptions in a city / region that do not comply with the geographical or summer time rule. Arizona at MST and some Indiana cities at CST.

The widget includes the ability to remember the last 5 options of the user and present them at the top of the list.

The widget will also allow the user to type using autosuggest (which will treat user input as a prefix, suffix, and anywhere else in the query. Which in SQL terms is equivalent to: WHERE some_column_name LIKE% query%). Their typing is a limited set of options to make the list much shorter. those. CST will present several time zones that use CST as an abbreviation, -7 will provide a list of cities in which their current time zone is set to GMT-7, 5.5 will list the country of Inida, etc.

If someone knows about widgets close to this, it will be interesting to find out where they get the time zone and DST data, since there are several sources, and the data is always updated.

+6
source share
1 answer

I think there is a useful dev branch on github timepicker with timezone here .

Regarding the limited set of inputs, I really like timepickr , but it still needs a timezone. I'm not sure how you plan to send this field to the database, but you can just have an adjacent text field field for the time zone and associate it with jquery autocomplete for time zones, which would be nice because they could filter out as long as and the abbreviation for time zone, if you have them in a text label together.

It would also not be difficult to use jquery autocomplete to collapse your own limited implementation.

+2
source

Source: https://habr.com/ru/post/888682/


All Articles