3

i am using ReactJS and ReduxJS to construct my application .

I created my form using Redux-Form and there are many text input and for one of them ,i am using onkeyDown event to increase and decrease number in my text

so when i click up arrow or enter first digit the text is auto completed with previous date entered(history) that disturb when i click another up arrow

[Hint] I tried AutoComplete=off and did not work

enter image description here

Esam eldean
  • 139
  • 1
  • 3
  • 16
  • You dont. http://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag – roberrrt-s Dec 09 '16 at 09:28

3 Answers3

15

You just have the attribute cased incorrectly. You can use the following 3 attributes on the input:

autoComplete="off"
autoCorrect="off"
spellCheck="off"

Notice that each are camel case.

Davin Tryon
  • 66,517
  • 15
  • 143
  • 132
  • 2
    It should be `autoComplete={false} autoCorrect={false} spellCheck={false}`. But still.. It's not working – Darex1991 Oct 26 '17 at 09:33
  • @Darex1991 autocorrect values are off/on: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocorrect. I do this. and it does work. – Davin Tryon Oct 26 '17 at 09:35
  • Hmm, I tried it on React-native and redux it's showing me an error about propTypes- that property should be boolean. – Darex1991 Oct 26 '17 at 09:38
  • React-native uses a completely different set of input elements. This question was about the web. – Davin Tryon Oct 26 '17 at 09:43
4

Seems like autoComplete="off" no longer works in Chrome. A workaround is to either set autoComplete="new-password" or a value not supported: autoComplete="something-unsupported".

Remi Sture
  • 12,000
  • 5
  • 22
  • 35
0

i have tried all of the above example but this one is worked for me autoComplete="off"

Preeti Maurya
  • 193
  • 2
  • 4