Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Predictible TimeZone Picker

TimeZone Picker that fills in user's timezone.

Getting Started

Download the production version or the development version.

In your web page:

<select id="zonePicker"></select>

<script src="jquery.js"></script>
<script src="dist/predictibletimezonepicker.min.js"></script>
  jQuery(function ($) {

By default options created by zone picker will be in this format:

  <option value="-5">-5 America/New_York</option>

You can change format of options by passing some options to Zone Picker:

  jQuery(function ($) {
      valueFormat: 'name',
      textFormat: 'number'

Supported formats are:

  • number - just a offset number -5 for NY, this is default for value
  • name - just a name of time zone (America/New_York)
  • combination - combination of both (-5 America/New_York), default for text
  • custom - custom formating function, function needs to be passed in options (valueFunction and textFunction)

####Custom functions

Usage of custom function:

  jQuery(function ($) {
      valueFormat: 'custom',
      valueFunction: function(zone) {
      	return + " " + zone.offset;
      textFormat: 'custom',
      textFunction: function(zone) {
      	return + + " " + zone.offset;

Zone object only has info about name of zone and number (offset of the zone).

	'offset' : '-5',
	'name' : 'America/New_York'


MIT © Pavel Polivka

You can’t perform that action at this time.