uNmAnNeR / imaskjs

vanilla javascript input mask

Home Page:https://imask.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot see leading zeros in unmasked value

dakota-kallas opened this issue · comments

Describe the bug
I am not able to get the leading zeros of my number when calling mask.unmaskedValue even when I set normalizeZeros to false.

To Reproduce
This issue is when I am using a number mask with leading zeros in the entered value and the normalizeZeros property on the mask set to false.
CodePen Link

Expected behavior
I would expect that becuase is set the normalizeZeros property to false, I would also be able to see the leading zeros in my unmaskedValue.

Environment:

  • OS: Windows 10
  • Browser: Chrome
  • Version: 116.0.5845.188
  • IMask version: 7.1.3

@dakota-kallas well normalizeZeros option is about input process, not about unmasking. Can you use mask.value instead?