Unverified Commit 60c1b8cc authored by Puranjay Jain's avatar Puranjay Jain Committed by GitHub
Browse files

Merge pull request #228 from ph168/arrow-animation-inner24

Fix arrow rotation for inner24 mode
parents 31581832 fc463830
......@@ -822,9 +822,15 @@ class mdDateTimePicker {
spoke = 12
value = me._sDialog.sDate.format('h')
}
const rotationClass = me._calcRotation(spoke, parseInt(value, 10))
const parsedValue = parseInt(value, 10)
const rotationClass = me._calcRotation(spoke, parsedValue)
if (rotationClass) {
needle.classList.add(rotationClass)
if (this._inner24 === true && spoke === 24 && parsedValue > 12) {
needle.classList.add('mddtp-picker__cell--rotate24')
}
}
}
......@@ -1495,7 +1501,14 @@ class mdDateTimePicker {
if (spoke === 12) {
value *= 10
} else if (spoke === 24) {
value *= 5
if (this._inner24 === true) {
if (value > 12) {
value -= 12
}
value *= 10
} else {
value *= 5
}
} else {
value *= 2
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment