profile
viewpoint

Ask questionsclearing out value (backspace) with minimumValue defined

Current behavior:

  • When using the minimumValue we cannot clear out the number with for example backspace

Expected behavior

  • The value should be cleared because NULL or empty is not a real number

Steps to reproduce the problem

  • Use AutoNumeric 4.6.x
  • use property minimumValue: 1
  • type in a number for example 1
  • do backspace
  • the value is not cleared and stays on 1

This works well with version 4.5.x .!

autoNumeric/autoNumeric

Answer questions AlexandreBonneau

Indeed, I did not unpin #543 since 1) it was a long awaited feature request, and 2) it changes quite a bit the philosophy of AutoNumeric where the value was always supposed to be valid.

So, apart if I did not understood the issue, I think it's moot since you can indeed repeat the steps and clear the field value when the minimumValue is set to 1. You just have to specify the overrideMinMaxLimits: 'invalid' option (by default the behavior is not changed, as in the value is always kept valid).

Please checkout the reproducible test case.

useful!

Related questions

Destroy multiple autonumeric hot 1
The selector did not select any valid DOM element. Please check on which element you called AutoNumeric. hot 1
On initialization, `allowDecimalPadding` option `'floats'` does not hide the decimal zeroes if set in the html attribute hot 1
Need option to indicate seed value is already localized hot 1
ajax double initialize hot 1
The value [] being set falls outside of the minimumValue [] and maximumValue [] range set for this element hot 1
`digitGroupSeparator` do not recognize the `' '` string hot 1
The value [] being set falls outside of the minimumValue [] and maximumValue [] range set for this element hot 1
Admit locales (es-ES, en-GB, etc.) to format the numbers hot 1
Setting `unformatOnSubmit` to `true` does not unformat the element on the form' `submit` event hot 1
Input value will undo on focusout when using only Ctrl+Backspace hot 1
'formulaMode: true' - not working hot 1
source:https://uonfu.com/
Github User Rank List