Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[3.1.2] - 2025-11-07
- Fix problems with
var(--timepicker-text);
[3.1.2] - 2025-11-07
- Fix problem with input color
[3.1.1] - 2025-11-07
Added
- Virtual DOM caching for clock face tips - Reuses DOM elements instead of recreating them on each render for 25% performance improvement
- RequestAnimationFrame batching for DOM updates - Smoother animations and reduced layout thrashing
- Input sanitization - Security enhancement to prevent XSS attacks in time input fields
Changed
- Clock face rendering now uses element pooling with Map-based cache
- DOM updates are batched using RAF for better performance during clock hand animations
- User input is sanitized before processing in setValue and event handlers
- Reduced DOM operations by caching clock tip elements
- Eliminated unnecessary innerHTML clearing on every render
- Improved animation smoothness with RAF-based update scheduling
[3.1.0] - 2025-11-07
Added
- EventEmitter API - Modern event handling system with
on(), once(), and off() methods
- Subscribe to events:
picker.on('confirm', callback)
- One-time events:
picker.once('open', callback)
- Unsubscribe:
picker.off('confirm', callback)
- Type-safe event handling with full TypeScript support
- New event names for EventEmitter:
confirm, cancel, open, update, select:hour, select:minute, select:am, select:pm, error
- Exported EventEmitter class - Available for advanced users who want to use it separately
- Dual event system - Both EventEmitter and DOM events fire simultaneously for backward compatibility
Changed
- Event system refactored to use internal EventEmitter for better memory management
- DOM events (
timepicker:*) are now considered legacy and will be removed in v4.0.0
Deprecated
- DOM events (e.g.,
timepicker:confirm, timepicker:cancel) - Use EventEmitter API instead
- These events will be removed in v4.0.0
Fixed
- Fixed TypeScript compilation errors in event managers
- Fixed
undefined checks for optional managers (clockManager, animationManager, configManager)
- Fixed type safety issues with
_disabledTime interface - added missing minutes property
- Fixed event handler type mismatches in
openElement iteration
Migration Guide
// Old way (deprecated, will be removed in v4)
input.addEventListener("timepicker:confirm", (e) => {
console.log(e.detail);
});
// New way (recommended)
picker.on("confirm", (data) => {
console.log(data);
});
[3.0.2] - 2025-07-25
Fixed
- Fixed an issue where switching between desktop and mobile views caused the timepicker instance to stop working.
The
destroy() method was incorrectly called during the transition, unintentionally removing the instance.
[3.0.1] - 2025-07-25
Fixed
- Fixed all incorrect paths to CSS, JS, and TypeScript declaration files across all environments (Angular, React, Vanilla, etc.)
- Improved Angular integration example for clarity
[3.0.0] - 2025-07-25
Added
Changed
- Event system rewritten – legacy DOM events (e.g.
confirm, cancel) have been replaced with namespaced events (timepicker:*)
- Cleaner destroy() – no more DOM cloning or breaking React/Vue refs
- Improved mobile/desktop switch UX
- New modular class structure under the hood
Fixed
destroy() no longer removes original input element (breaking change fix)
- Fixed incorrect disabled hour rendering in some edge cases
- Fixed scrollbar issues with backdrop
- Improved focus trap logic
Removed
- Old unnamed DOM events (
confirm, cancel, update, etc.)
- Implicit theme logic – now explicit via
theme option
- Legacy error handler structures
[2.6.1] - 2022-11-17
Add
- added new value to the property
theme called m3.
Theme m3 based on the new Material Design v3. Material Design 3 is still not release in offical version for WEB but you can use it if you want.
There is new version of Material Design 3.
If new version M3 will be released this design will get improve.
[2.6.0] - 2022-11-16
Change
- changed invoke of
close() method. These method has to invoke with double parentheses close()(). The first parentheses doesn’t have any parameters, the second has the same what had in the previous method.
Add
- added
delayHandler prop to avoid delay on buttons
Fix
- fixed problem with 0NaN error when using touch input. Thanks to @grizzlymannn
[2.5.0] - 2022-05-06
Change
- changed logic about
hour and minutes. Previous version used divs as buttons, the current version is using inputs instead divs.
- removed
preventDefault option, to use editable option is enough to set this option to true
Add
- added
debounce function to close/open timepicker
Fix
- fixed problem with
edtiable options durning change hour/minutes on desktop/mobile
[2.4.5] - 2022-04-02
Fix
- fixed unnecessary change code to
disable Time
[2.4.4] - 2022-04-02
Fix
- fixed problem with
focusTrap with React about eval error
[2.4.3] - 2022-04-02
Fix
- fixed problem with
minutes option in currentTime
Add
- added
focusTrap to turn off/on focus traping on picker. The default value is set to true
- added possibility to open picker by click enter if input is focused
[2.4.2] - 2022-03-29
Fix
- fixed problem with
currentTime about displaying wrong hour in the picker
- fixed problem with
editable option when switch during desktop/mobile options
Add
- added
OptionTypes to allows to import types from package
[2.4.1] - 2022-03-26
Add
- added new
currentTime option
Fix
- fixed landscape on the mobile view
Update
- updated comments in code to methods/options to show properly descriptions in codes editors
[2.4.0] - 2022-03-22
Add
- added new update method
- added new destroy method
- added new option
disabledTime that allows to set to timepicker disabled time
Update
- updated a methods open, close with new parameters and callbacks
[2.3.0] - 2022-03-05
Fix
Change
- changed option name from
selectLabelTime to labelTime
Add
- added UMD version
- added new options
mobileTimeLabel to change time label on mobile version
[2.2.3] - 2021-09-26
Update
- Update README.md and links
[2.2.2] - 2021-09-25
Fixed
- Fixed hand circle SCSS on the crane mode
- Fixed am/om SCSS on the crane mode
Update
- Update typings, remove alomost all @ts-ignore and any types.
[2.2.1] - 2021-09-24
Fixed
- Fixed scss with landscape version
- Fixed class active to hour/minutes
[2.2.0] - 2021-09-23
Added
- Version 24h
- Input validation
Update
- Change scss styles
- Update types
[2.1.1] - 2021-01-24
Fixed
- Fixed problem with transition
[2.1.0] - 2021-01-24
Added
- Added new option
animated to turn on/off animations on picker on start/close.
- Added new option
editable to edit hour/minutes on the web mode.
- Added new option
preventDefault to turn on/off defaults events to clock face events.
Change
- Change docs example
- Removed unnecessary option
inputTemplate from options types.
Fixed
- Fixed problem with events on remove
[2.0.2] - 2021-01-21
Fixed
- Fixed problem with close event.
[2.0.1] - 2021-01-18
Fixed
- Fixed problem with keyboard icon click on mobile.
[2.0.0] - 2021-01-17
Changed
- Everything was rewritten to TypeScript
Fixed
- Fixed problems with move events on mobile.
[1.2.0] - 2020-11-05
Changed
- Fixed return values of
type in the events
Added
- Added the possibility to have multiple open elements on init