tz_select - Display an HTML select menu of time zones with Lasso

The project tz_select and its source files are hosted on GitHub.

Description

[tz_select] returns an HTML select menu of all known time zones, grouped into US common, continents, regions, UTC, and manual offsets.

It is used in the demos for tz_convert and countdown.

Demo

Demo.

Usage

tz_select requires one parameter and a second parameter is optional.

-name is required and must be a string type. Its value must be the name of the select HTML menu.

-selected is optional but must be a string type. Its value should be the value of the selected time zone.

Example

1
2
3
4
<div>
<label>Timezone</label>
[tz_select(-name='timezone', -selected=action_param('timezone'))]
</div>

Output is a select HTML menu.

Installation and Requirements

The repository contains the tag [tz_select] in a file named tz_select.lasso and a directory tz_select_demo containing the demo. In this directory there is a web page named index.lasso containing the tz_select tag.

There are no additional requirements.

Did you like this article? Please send me a Gratipay, as little as 25¢ per week!

Updates, suggestions and comments regarding this article may be sent to Steve Piercy, web@stevepiercy.com or comment using Disqus.


Written by Steve Piercy in Lasso on Sun, Dec 28, 2014.
Last modified: Sun, Dec 28, 2014
Tags: date, time, time zone, tz_convert, countdown, Lasso

Comments

comments powered by Disqus