ajv-material-pickers-time
Advanced tools
Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "ajv-material-pickers-time", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "Material design time picker", | ||
@@ -5,0 +5,0 @@ "main": "./dist/TimePicker.js", |
@@ -241,3 +241,5 @@ import template from './template' | ||
this.cachedEls.body.style.overflow = 'hidden' | ||
this.cachedEls.meridiem.style.visibility = isMilitaryFormat ? 'none' : 'visible' | ||
this.cachedEls.meridiem.style.visibility = isMilitaryFormat | ||
? 'none' | ||
: 'visible' | ||
this.cachedEls.overlay.style.display = 'block' | ||
@@ -321,3 +323,3 @@ this.cachedEls.clockHand.style.height = isMilitaryFormat ? '90px' : '105px' | ||
setDisplayTime({ hours, minutes }) { | ||
if (hours) { | ||
if (typeof hours !== 'undefined' && Number.isNaN(hours) === false) { | ||
// .trim() is not allowed if hours is not recognized as a string, | ||
@@ -330,3 +332,4 @@ if (typeof hours === 'string' || hours instanceof String) { | ||
} | ||
if (minutes) { | ||
if (typeof minutes !== 'undefined' && Number.isNaN(minutes) === false) { | ||
const min = minutes < 10 ? `0${minutes}` : minutes | ||
@@ -507,3 +510,2 @@ | ||
)[0] | ||
const value = element.innerHTML | ||
@@ -513,4 +515,2 @@ if (!currentActive.isEqualNode(element)) { | ||
element.classList.add(activeClassName) | ||
// this.cachedEls.displayMeridiem.innerHTML = 'a.m.' | ||
// this.cachedEls.displayMeridiem.innerHTML = value | ||
} | ||
@@ -517,0 +517,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
697218
4205