├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── MIGRATION.md ├── README.md ├── babel.config.js ├── demo ├── .gitignore ├── README.md ├── babel.config.js ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ ├── _variables.styl │ │ └── demo.styl │ ├── components │ │ ├── ConfigRow.vue │ │ ├── OverlayPanel.vue │ │ ├── Playground.vue │ │ ├── SampleBlock.vue │ │ └── Samples.vue │ └── main.js └── vue.config.js ├── dist ├── VueTimepicker.common.js ├── VueTimepicker.common.js.map ├── VueTimepicker.css ├── VueTimepicker.umd.js ├── VueTimepicker.umd.js.map ├── VueTimepicker.umd.min.js ├── VueTimepicker.umd.min.js.map └── demo.html ├── package.json └── src ├── index.js └── vue-timepicker.vue /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | *.7z 13 | *.dmg 14 | *.gz 15 | *.iso 16 | *.jar 17 | *.rar 18 | *.tar 19 | *.zip 20 | 21 | # Cache and logs # 22 | ################## 23 | Application/Runtime/Cache/ 24 | Application/Runtime/Logs/ 25 | Application/Runtime/Temp/ 26 | *.log 27 | 28 | # OS generated files # 29 | ###################### 30 | .DS_Store 31 | .DS_Store? 32 | ._* 33 | .Spotlight-V100 34 | .Trashes 35 | ehthumbs.db 36 | Thumbs.db 37 | ~$* 38 | .editorconfig 39 | 40 | # NodeJS Packages # 41 | ################### 42 | node_modules 43 | yarn.lock* 44 | package.lock* 45 | 46 | # Bower Packages # 47 | ################### 48 | bower 49 | bower_components 50 | 51 | # Test and Logs # 52 | ################# 53 | npm-debug.log 54 | yarn-debug.log* 55 | yarn-error.log* 56 | selenium-debug.log 57 | test/unit/coverage 58 | test/e2e/reports 59 | 60 | # local env files # 61 | ################### 62 | .env.local 63 | .env.*.local 64 | 65 | # Editor directories and files # 66 | ################################ 67 | .idea 68 | .vscode 69 | *.suo 70 | *.ntvs* 71 | *.njsproj 72 | *.sln 73 | *.sw? 74 | 75 | # Others # 76 | ########### 77 | gh-pages 78 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | > The Change Log of Vue2 Timepicker `vue2-timepicker` 4 | 5 | ## v 1.1.6 6 | 7 | ### New 8 | 9 | - Support appending the dropdown menu to the document body with `append-to-body` 10 | 11 | ### Improvements 12 | 13 | - In Manual Input mode, support jumping to the next token slot with a colon (`:`) or space (` `) key. 14 | - Return full data on `blur` and `close` events as per the `change` event. 15 | 16 | ## v 1.1.5 17 | 18 | ### New 19 | 20 | - Support changing dropdown direction with the `drop-direction` property. It accepts three string values: `"up"`, `"auto"` and `"down"` _(default)_. 21 | - Additional `container-id` and `drop-offset-height` as helpers for the **"auto"** drop direction. Please check the documentation for more info. 22 | 23 | ## v 1.1.4 24 | 25 | ### New 26 | 27 | - Support customized clear button and dropdown button with the `clearButton` and `dropdownButton` **v-slot** (Thanks to @jost-s). 28 | - Added new `icon` **v-slot** for displaying an extra input icon. 29 | - Added new `fixed-dropdown-button` property, to make the dropdown button always visible. 30 | 31 | ## v 1.1.3 32 | 33 | ### Improvements 34 | 35 | - Enhanced `hide-dropdown` feature -- When the dropdown is hidden by default, users can choose to open the dropdown by clicking the triangle button "▾" (Thanks to @jost-s). 36 | - Refined `focus` and `blur` event. 37 | - Minor fixes for the Advanced Keyboard mode. 38 | 39 | ## v 1.1.2 40 | 41 | ### New 42 | 43 | More powerful `format` string parameter. E.g., you can hide the "hour" column by setting `format="mm:ss"`, or make AM/PM the first column by `format="A hh:ss"`, no extra CSS hacking needed. Please check the Demo page for more examples. 44 | 45 | ### Improvements 46 | 47 | - Support `shift+tab` to navigate to the previous token slot in the Manual Input mode (Thanks to @jost-s). 48 | - Other minor keyboard navigation enhancements for Manual Input mode 49 | 50 | ## v 1.1.1 51 | 52 | ### Improvements 53 | 54 | Instant feedback after manual input. Plus, add a new `manual-input-timeout` property to help set up the timeout for continuous input (Thanks to @jost-s). 55 | 56 | #### Notes for Contributors 57 | 58 | We've upgraded to use vue-cli **v4** in this version. Please check the CONTRIBUTING.md for more info. 59 | 60 | 61 | ## v 1.1.0 62 | 63 | ### New 64 | 65 | - Support manually input values with the `manual-input` toggle. 66 | - Enable to hide the dropdown menu with `hide-dropdown` in Manual Input (`manual-input`) mode. 67 | - Added conditional helper classes `is-empty`, `invalid` and `all-selected` to the `` element. 68 | - Change the `` border to red color when user input is invalid. E.g., when it contains a disabled hour value. You can mute this auto-styling by adding `"skip-error-style"` to `input-class`. 69 | - Add support to the `autocomplete` attribute. 70 | - Emit `error` event when the input value becomes invalid. 71 | - Emit `focus` and `blur` events to help to identify the focus/blur state. Useful when the dropdown is force hidden by `hide-dropdown`. 72 | 73 | ### Improvements 74 | 75 | Enable seamless loop from the start or end of a column in `advanced-keyboard` mode. 76 | 77 | ## v 1.0.8 78 | 79 | ### Improvements 80 | 81 | Keep the dropdown menu open when mouse drag on the hour/minute/second list's scrollbar handler. 82 | 83 | ## v 1.0.7 84 | 85 | ### Fixes 86 | 87 | Fixes `placeholder` not dynamically updated issue in some cases (Thanks to @ObsidianTech). 88 | 89 | ### Improvements 90 | 91 | Vertical alignment refined for the clear button across different browsers. 92 | 93 | ## v 1.0.6 94 | 95 | ### New 96 | 97 | Added `auto-scroll` feature. 98 | 99 | ### Improvements 100 | 101 | On Advanced Keyboard mode, auto-focus on the selected value (if any) in priority. 102 | 103 | ## v 1.0.5 104 | 105 | ### Fixes 106 | 107 | Fixes the Advanced Keyboard tab navigating feature on Firefox 108 | 109 | ## v 1.0.4 110 | 111 | ### Improvements 112 | 113 | - Adjust the default value of `blur-delay` to 300ms. (Thanks to @rjurado01). 114 | - Added _Array_ and _Object_ types support to `input-class`. 115 | 116 | ## v 1.0.3 117 | 118 | ### New 119 | 120 | Added `lazy` event mode. (Thanks to @VictorCazanave) 121 | 122 | ## v 1.0.2 123 | 124 | ### New 125 | 126 | - Support customized labels for the hour, minute, second, and APM pickers (Thanks to @maritaria). 127 | - Support setting customized text to replace the `am`/`pm` (`AM`/`PM`) string in the UI. 128 | - Added `input-width` property to help to adjust Timepicker's width with ease. 129 | 130 | ### Improvements 131 | 132 | Added more guiding notes for SSR usage. (Thanks to @oj-recit) 133 | 134 | ## v 1.0.1 135 | 136 | ### Fixes 137 | 138 | Fixes the _String_ form `v-model` support on Edge and Safari 139 | 140 | ## v 1.0.0 141 | 142 | ### Breaking Changes 143 | 144 | **⚠️ IMPORTANT:** The default **import** source in `v1.0.0+` is different from the `v0.x` versions. 145 | 146 | From `v1.0.0+`, CSS is excluded from the main source. Please import the CSS file separately. 147 | 148 | ```javascript 149 | // v1.0.0+ 150 | // 151 | import VueTimepicker from 'vue2-timepicker' 152 | // -> Imports JS file in UMD form 153 | 154 | // CSS 155 | import 'vue2-timepicker/dist/VueTimepicker.css' 156 | ``` 157 | 158 | Comparing to: 159 | 160 | ```javascript 161 | // While in the v0.x versions 162 | import VueTimepicker from 'vue2-timepicker' 163 | // -> Imports the *.vue Single File Component together with CSS 164 | ``` 165 | 166 | Please check the [Documentation](https://github.com/phoenixwong/vue2-timepicker/blob/master/README.md#get-started) for more available import formats. 167 | 168 | ### New 169 | 170 | - Support using _String_ value in `v-model`. 171 | - New `minute-range` and `second-range` support. Companioned with `hide-disabled-minutes` and `hide-disabled-seconds`. 172 | - New `hide-disabled-items` property for hiding **all** excluded items (hour, minute and seconds) at a time. 173 | - New `close-on-complete` for automatically close the dropdown when the user finishes selecting **all** of the required fields. 174 | - Added `advanced-keyboard` support for Arrow Keys navigation and Space/Enter key selection. 175 | - New `tabindex` property support, which will be assigned to the `` within the component. 176 | - Added `debug-mode` to help developers investigating the input -> output process. 177 | 178 | ### Fixes 179 | 180 | Added ES "module" and other version fields in _package.json_ to resolving more loader issues. (Thanks to @Trainmaster) 181 | 182 | ### Improvements 183 | 184 | When `hour-range` is set in a 12-hour format Timepicker, recheck the selected hour's validity after user switching "AM/PM" from the dropdown. 185 | 186 | ## v 0.2.2 187 | 188 | ### Fixes 189 | 190 | Fixes `v-model` watcher for cases like changing the input value programmatically (non-user behavior). 191 | 192 | ### Improvements 193 | 194 | Added `displayTime` in the return data of `change` event. 195 | 196 | ## v 0.2.1 197 | 198 | ### New 199 | 200 | - New `input-class` support. The custom input class will be assigned to the `` within the component. (Thanks to @marufmax) 201 | - Add support to `placeholder`, just like other regular form elements 202 | 203 | ### Improvements 204 | 205 | Refined `@click.stop` logic 206 | 207 | ### Fixes 208 | 209 | Fixes possible loader issue in some Webpack configs (Thanks to @RaphaelJ) 210 | 211 | ## v 0.2.0 212 | 213 | ### Breaking Changes 214 | 215 | - Upgraded to support more current **vue** (2.6.10) and **vue-cli** (3.9.0) with Webpack 4. 216 | 217 | ### New 218 | 219 | - New `hour-range` support. Added capability to show which hours are available and disabled the rest. 220 | - New `hide-disabled-hours`. The best companion of `hour-range`, for you to hide unwanted hours in the hour picker. 221 | - New `disabled` parameter. To disable dropdown picker and clear button in the UI. 222 | - Emit `open` and `close` events to help tracking the dropdown toggle status. (Thanks to @tprashan) 223 | 224 | ### Improvements 225 | 226 | - Put `12` before `1` in the hour select for 12-hour format (`hh` and `h`). It will be more natural, especially when paired with `hour-range`. 227 | - Support `name` parameter as regular form inputs. (Thanks to @dilipgurung) 228 | 229 | ## v 0.1.4 230 | 231 | ### Fixes 232 | 233 | Added stop propagation `.stop` to click events 234 | 235 | ## v 0.1.3 236 | 237 | ### Improvements 238 | 239 | Add support to `