Skip to content

angular based polyfill for input type number controls in Microsoft Browsers

License

Notifications You must be signed in to change notification settings

comsolit/inputNumberPolyfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS REPO IS UNMAINTAINED / A NEW MAINTAINER IS NEEDED

Polyfill for Input type="number"

This Polyfill adds buttons to step up and down the value of an input type number element in Internet Explorer 10+ and Edge.

The Polyfill requires angular version >1.4 but might also work with older versions of angular.

You need to include the module comsolitInputNumberPolyfill and declare the min, max and step attributes on an input type number element:

<body ng-app="myapp">

  <input type="number" min="0" max="42" step="1" />

  <script>
    angular.module('myapp', ['comsolitInputNumberPolyfill']);
  </script>
</body>

See also the index.html file in this repository for more examples.

LICENSE

This code is released under the MIT license, see the LICENSE file.

TODO

The polyfill has no upper boundary test. So if any future version of a Microsoft Browser should ever support number controls than the needsPolyfill function needs to be adapted.

About

angular based polyfill for input type number controls in Microsoft Browsers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published