2.14.0 • Published 7 years ago

date-input-polyfill v2.14.0

Weekly downloads
10,055
License
MIT
Repository
github
Last release
7 years ago

date-input-polyfill

Just include this simple script and IE, Firefox, and OS X Safari will support <input type="date">, without any dependencies, not even jQuery!

Support dynamically created inputs, so can be used in single page applications.

Forked from nodep-date-input-polyfill. Continuing as a separate project.

Install

npm install --save date-input-polyfill

Add to your project:

  • Webpack/Browserify: require('date-input-polyfill');

    or alongside Babel: import 'date-input-polyfill';

  • Script Tag: Copy date-input-polyfill.dist.js from node_modules and include it anywhere in your HTML.

  • This package also supports AMD.

Features

  • Easily Stylable: These are the default styles, which you may override with your own.

  • Polyfills valueAsDate and valueAsNumber: Learn more about these properties. They behave as getters and setters.

  • Keyboard Shortcuts: Esc will hide the datepicker. Up/Down will increment/decrement the date by one day.

  • Localization: Specify the datepicker's locale by setting the lang attribute of the input element. The default locale is en.

    `<input type="date" lang="en" />`
  • Formatting: Specify the display format by setting either the date-format or data-date-format attribute of the input element. The default format is yyyy-mm-dd. Available options list.

    `<input type="date" date-format="mm/dd/yyyy" />`
    
    `<input type="date" data-date-format="mm/dd/yyyy" />`

Contributing

Local Development

Run npm start or, for Cloud9 IDE users: npm run start-c9

Build

Run npm run build

2.14.0

7 years ago

2.13.0

7 years ago

2.12.0

7 years ago

2.11.5

8 years ago

2.11.4

8 years ago

2.11.3

8 years ago

2.11.2

8 years ago

2.11.1

8 years ago

2.11.0

8 years ago

2.10.2

8 years ago

2.10.1

8 years ago

2.10.0

8 years ago

2.9.10

8 years ago

2.9.9

8 years ago

2.9.8

8 years ago

2.9.7

8 years ago

2.9.6

8 years ago

2.9.5

8 years ago

2.9.4

8 years ago

2.9.3

8 years ago

2.9.2

8 years ago

2.9.1

8 years ago

2.9.0

8 years ago

2.8.15

8 years ago

2.8.14

8 years ago

2.8.13

8 years ago

2.8.12

8 years ago

2.8.10

8 years ago

2.8.9

8 years ago

2.8.8

8 years ago

2.8.7

8 years ago

2.8.6

8 years ago

2.8.5

8 years ago

2.8.4

8 years ago

2.8.3

8 years ago

2.8.2

8 years ago

2.8.1

8 years ago

2.8.0

8 years ago

2.7.15

8 years ago

2.7.14

8 years ago

2.7.13

8 years ago

2.7.12

8 years ago

2.7.11

8 years ago

2.7.10

8 years ago

2.7.9

8 years ago

2.7.8

8 years ago

2.7.7

8 years ago

2.7.6

8 years ago

2.7.5

8 years ago

2.7.4

8 years ago

2.7.3

8 years ago

2.7.2

8 years ago

2.7.1

8 years ago

2.7.0

8 years ago

2.6.0

8 years ago

2.5.0

8 years ago