This component based on moment-timezone to select timezone based on location. Check more about moment-timezone here The component has two features that it can be used for desktop and mobile. In desktop it is displayed as map dialog and in mobile view dropdown will be displayed.
- Demos can be found here
- Below is sample screenshot in dialog view.
- Below is sample screenshot in dropdown view
- It also supports for mobile devices so that it can be viewed as dropdown in mobile devices.
- Extremely simple to set up (simple demo)
- Format type is property that show offset as suffix in hours or minutes. By default it will be shown in minutes.
- Support custom styling (demo)
The element can be installed using bower using
bower install --save paper-timezone
- Following code is required to place in the polymer web component.
- It is used to select timezone offset from dialog or dropdown. Check out the getting started guide.
Default timezone:
<paper-timezone name="timezone" timezone="[[timezone]]" label="Timezone (Continent/City)" error-message="Please enter a timezone offset"></paper-timezone>
You may also specify a responsive width to display this element as dropdown.
<paper-timezone timezone="[[timezone]]" responsive-width="[[responsiveWidth]]" label="Timezone (Continent/City)" error-message="Please enter a timezone offset"></paper-timezone>
Format type is property that show offset as suffix in hours or minutes. By default it will be shown in minutes.
<paper-timezone format-type="hours" timezone="[[timezone]]" label="Timezone (Continent/City)" error-message="Please enter a timezone offset"></paper-timezone>
When filing a bug report, please provide an example of how to repoduce using plunker, jsbin, jsfiddle, etc.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 of the License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
We absolutely love sending us new pull requests, so let us just outline some advice:
- If you are planning on doing anything except a quick fix, it's a wise idea to open an issue first with your plans. That way we can talk it through and check whether it might not already be easily possible and whether it fits with the spirit of the component (I try to keep everything pretty declarative, generic and Polymer-y).
- You absolutely must make every feature you work on at least a separate commit and ideally a separate pull request. This both makes it clearer to me what is what, makes it easier to pull only the relevant parts and prevents situations where I can't give credits to the good parts, because of the bad parts.
- You have to explicitly agree in your pull request to the terms described in the fair share license construction.