├── .gitignore ├── LICENSE.txt ├── README.md ├── bower.json ├── demo └── index.html ├── index.html ├── paper-time-input.html └── test └── paper-time-input_test.html /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Ryan Burns 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # \ 2 | 3 | [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/ryanburns23/paper-time-input) 4 | 5 | 6 | Polymer element to accept a time with paper-input & paper-dropdown-menu 7 | Inspired by the time-input in google forms 8 | 9 | Polymer 2 supported 10 | 11 | 32 | 33 | ```html 34 | 35 | ``` 36 | 37 | - paper-menu-button 2.0 depends on neon-animation 2.0, which doesn't import the Web Animations polyfill, so you'll have to import it 38 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-time-input", 3 | "description": "Polymer element to accept a time with paper-input", 4 | "main": "paper-time-input.html", 5 | "dependencies": { 6 | "polymer": "Polymer/polymer#1.9 - 2", 7 | "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#1 - 2", 8 | "paper-item": "PolymerElements/paper-item#1 - 2", 9 | "paper-listbox": "polymerelements/paper-listbox#1 - 2", 10 | "paper-input": "PolymerElements/paper-input#1 - 2", 11 | "iron-flex-layout": "PolymerElements/iron-flex-layout#1 - 2", 12 | "paper-styles": "PolymerElements/paper-styles#1 - 2" 13 | }, 14 | "devDependencies": { 15 | "iron-component-page": "PolymerElements/iron-component-page#^2.0.0", 16 | "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0", 17 | "web-component-tester": "^6.0.0", 18 | "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | paper-time-input demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 |
26 |

Basic Demo

27 | 28 | 37 | 38 |
39 | 40 |
41 |

24 hour format

42 | 43 | 46 | 47 |
48 | 49 |
50 |

Pre Set Time

51 | 52 | 55 | 56 |
57 | 58 |
59 |

Disabled

60 | 61 | 64 | 65 |
66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | paper-time-input 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /paper-time-input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 31 | 32 | 33 | 153 | 154 | 287 | 288 | -------------------------------------------------------------------------------- /test/paper-time-input_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | paper-time-input test 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 29 | 30 | 31 | --------------------------------------------------------------------------------