The Change Log of Vue2 Timepicker
vue2-timepicker
- Support appending the dropdown menu to the document body with
append-to-body
- In Manual Input mode, support jumping to the next token slot with a colon (
:
) or space ( - Return full data on
blur
andclose
events as per thechange
event.
- Support changing dropdown direction with the
drop-direction
property. It accepts three string values:"up"
,"auto"
and"down"
(default). - Additional
container-id
anddrop-offset-height
as helpers for the "auto" drop direction. Please check the documentation for more info.
- Support customized clear button and dropdown button with the
clearButton
anddropdownButton
v-slot (Thanks to @jost-s). - Added new
icon
v-slot for displaying an extra input icon. - Added new
fixed-dropdown-button
property, to make the dropdown button always visible.
- 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). - Refined
focus
andblur
event. - Minor fixes for the Advanced Keyboard mode.
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.
- Support
shift+tab
to navigate to the previous token slot in the Manual Input mode (Thanks to @jost-s). - Other minor keyboard navigation enhancements for Manual Input mode
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).
We've upgraded to use vue-cli v4 in this version. Please check the CONTRIBUTING.md for more info.
- Support manually input values with the
manual-input
toggle. - Enable to hide the dropdown menu with
hide-dropdown
in Manual Input (manual-input
) mode. - Added conditional helper classes
is-empty
,invalid
andall-selected
to the<input>
element. - Change the
<input>
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"
toinput-class
. - Add support to the
autocomplete
attribute. - Emit
error
event when the input value becomes invalid. - Emit
focus
andblur
events to help to identify the focus/blur state. Useful when the dropdown is force hidden byhide-dropdown
.
Enable seamless loop from the start or end of a column in advanced-keyboard
mode.
Keep the dropdown menu open when mouse drag on the hour/minute/second list's scrollbar handler.
Fixes placeholder
not dynamically updated issue in some cases (Thanks to @ObsidianTech).
Vertical alignment refined for the clear button across different browsers.
Added auto-scroll
feature.
On Advanced Keyboard mode, auto-focus on the selected value (if any) in priority.
Fixes the Advanced Keyboard tab navigating feature on Firefox
- Adjust the default value of
blur-delay
to 300ms. (Thanks to @rjurado01). - Added Array and Object types support to
input-class
.
Added lazy
event mode. (Thanks to @VictorCazanave)
- Support customized labels for the hour, minute, second, and APM pickers (Thanks to @maritaria).
- Support setting customized text to replace the
am
/pm
(AM
/PM
) string in the UI. - Added
input-width
property to help to adjust Timepicker's width with ease.
Added more guiding notes for SSR usage. (Thanks to @oj-recit)
Fixes the String form v-model
support on Edge and Safari
v1.0.0+
is different from the v0.x
versions.
From v1.0.0+
, CSS is excluded from the main source. Please import the CSS file separately.
// v1.0.0+
//
import VueTimepicker from 'vue2-timepicker'
// -> Imports JS file in UMD form
// CSS
import 'vue2-timepicker/dist/VueTimepicker.css'
Comparing to:
// While in the v0.x versions
import VueTimepicker from 'vue2-timepicker'
// -> Imports the *.vue Single File Component together with CSS
Please check the Documentation for more available import formats.
- Support using String value in
v-model
. - New
minute-range
andsecond-range
support. Companioned withhide-disabled-minutes
andhide-disabled-seconds
. - New
hide-disabled-items
property for hiding all excluded items (hour, minute and seconds) at a time. - New
close-on-complete
for automatically close the dropdown when the user finishes selecting all of the required fields. - Added
advanced-keyboard
support for Arrow Keys navigation and Space/Enter key selection. - New
tabindex
property support, which will be assigned to the<input type="text">
within the component. - Added
debug-mode
to help developers investigating the input -> output process.
Added ES "module" and other version fields in package.json to resolving more loader issues. (Thanks to @Trainmaster)
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.
Fixes v-model
watcher for cases like changing the input value programmatically (non-user behavior).
Added displayTime
in the return data of change
event.
- New
input-class
support. The custom input class will be assigned to the<input type="text">
within the component. (Thanks to @marufmax) - Add support to
placeholder
, just like other regular form elements
Refined @click.stop
logic
Fixes possible loader issue in some Webpack configs (Thanks to @RaphaelJ)
- Upgraded to support more current vue (2.6.10) and vue-cli (3.9.0) with Webpack 4.
- New
hour-range
support. Added capability to show which hours are available and disabled the rest. - New
hide-disabled-hours
. The best companion ofhour-range
, for you to hide unwanted hours in the hour picker. - New
disabled
parameter. To disable dropdown picker and clear button in the UI. - Emit
open
andclose
events to help tracking the dropdown toggle status. (Thanks to @tprashan)
- Put
12
before1
in the hour select for 12-hour format (hh
andh
). It will be more natural, especially when paired withhour-range
. - Support
name
parameter as regular form inputs. (Thanks to @dilipgurung)
Added stop propagation .stop
to click events
Add support to <label for="...">
(Thanks to @Reached)
<!-- Sample -->
<label for="yourID">Your Label Text</label>
<vue-timepicker id="yourID"></vue-timepicker>
Release the dist
files
The first notable release of Vue2 Timepicker