vue-resource icon indicating copy to clipboard operation
vue-resource copied to clipboard

Can't input zero in number field

Open arkeds opened this issue 10 years ago • 1 comments

I can't input zero as the first number in the number field. This happens when I put the vue-resource cdn after the vue.js file. If I enter 0 then a non zero number next, it removes the 0.

Here is the CDN that I used for the vue-resource. https://cdn.jsdelivr.net/vue.resource/1.0.3/vue-resource.min.js

arkeds avatar Oct 08 '16 17:10 arkeds

I believe it's a javascript/math concept: any zero prefixes of a number are ignored. you would have to set the field as a string in order to get the leading zero, or convert it through computed property. or take a look here http://stackoverflow.com/questions/8437529/html5-input-type-number-removes-leading-zero

andreixk avatar Oct 09 '16 11:10 andreixk