Skip to content

Release v1.1.6 #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

> The Change Log of Vue2 Timepicker `vue2-timepicker`

## v 1.1.6

### New

- Support appending the dropdown menu to the document body with `append-to-body`

### Improvements

- In Manual Input mode, support jumping to the next token slot with a colon (`:`) or space (` `) key.
- Return full data on `blur` and `close` events as per the `change` event.

## v 1.1.5

### New
Expand Down
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@ Works with `drop-direction="auto"` either. Defaults to `160` (unit: _px_) if the
<vue-timepicker drop-direction="auto" :drop-offset-height="200"></vue-timepicker>
```


### Lazy Event Mode

```html
Expand All @@ -604,9 +603,44 @@ When `lazy` event mode is toggled on, only an actual user behavior can trigger t

- The user opened the dropdown and picked a new value
- The user clicked the ("&times;") clear button
- The user inputted a new value or clear the existing value in the Manual Input mode

In other words, on `lazy` mode, Timepicker won't emit `input` and `change` events on mounted, nor after the value got modified programmatically.


### Append To Body

Append the dropdown menu to the end of the document `<body>`. Try this if you have `z-index` or `overflow` layout issue with the dropdown.

```html
<vue-timepicker append-to-body></vue-timepicker>
```

The body-appended dropdown's CSS class is `vue__time-picker-dropdown`. Its default `z-index` is `100`. You can change the value by adding the following style in your app --

```css
/* E.g. set the z-index to 5000 */
.vue__time-picker-dropdown {
z-index: 5000;
}
```

**NOTE**: If you have to override some of the CSS styles within the dropdown, you will need to update their selectors' class names as well. Simply change any `.vue__time-picker .dropdown` selector to `.vue__time-picker-dropdown`.

For example, when you have a customized background color set for selected values:

```css
/* Default override (not using "append-to-body") */
.vue__time-picker .dropdown ul li:not([disabled]).active {
background: steelblue;
}

/* When using "append-to-body" */
.vue__time-picker-dropdown ul li:not([disabled]).active {
background: steelblue;
}
```

### Enable Debug Mode

```html
Expand Down Expand Up @@ -671,6 +705,7 @@ Prop | Type | Required | Default Value
**container-id** | _String_ | no | _undefined_
**drop-offset-height** | _Number_ | no | 160
**lazy** | _Boolean_ | no | false
**append-to-body** | _Boolean_ | no | false
**debug-mode** | _Boolean_ | no | false


Expand Down
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue2-timepicker-demo",
"version": "1.1.5",
"version": "1.1.6",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand All @@ -9,7 +9,7 @@
},
"dependencies": {
"core-js": "^3.6.5",
"highlight.js": "^9.18.1",
"highlight.js": "^9.18.5",
"vue": "^2.6.11",
"vue-highlight.js": "^3.1.0"
},
Expand Down
18 changes: 18 additions & 0 deletions demo/src/components/Playground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export default {
lazyMode: false,
autoScroll: false,
skipErrorStyle: false,
appendToBody: false,
debugMode: false,

customBlurDelay: false,
Expand Down Expand Up @@ -220,6 +221,10 @@ export default {
start += ('\n auto-scroll')
}

if (this.appendToBody) {
start += ('\n append-to-body')
}

if (this.disablePicker) {
start += ('\n disabled')
}
Expand Down Expand Up @@ -865,6 +870,18 @@ section#playground
input(v-model="skipErrorStyle" type="radio" id="skip_error_false" name="skip_error", :value="false")
| &nbsp;Disable

#appendToBody.config-block
h3.subtitle
a.anchor #
| Append To Body
config-row(is-group)
label.options(for="append_to_body_true")
input(v-model="appendToBody" type="radio" id="append_to_body_true" name="append_to_body", :value="true")
| &nbsp;Enable
label.options(for="append_to_body_false")
input(v-model="appendToBody" type="radio" id="append_to_body_false" name="append_to_body", :value="false")
| &nbsp;Disable

#debugMode.config-block
h3.subtitle
a.anchor #
Expand Down Expand Up @@ -905,6 +922,7 @@ section#playground
:disabled="disablePicker"
:lazy="lazyMode"
:auto-scroll="autoScroll"
:append-to-body="appendToBody"
:debug-mode="debugMode"
:input-class="skipErrorStyle ? 'skip-error-style' : null"
@change="changeHandler"
Expand Down
172 changes: 154 additions & 18 deletions dist/VueTimepicker.common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/VueTimepicker.common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/VueTimepicker.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading