2.14.0 • Published 8 years ago

date-input-polyfill v2.14.0

Weekly downloads
10,055
License
MIT
Repository
github
Last release
8 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

8 years ago

2.13.0

8 years ago

2.12.0

8 years ago

2.11.5

9 years ago

2.11.4

9 years ago

2.11.3

9 years ago

2.11.2

9 years ago

2.11.1

9 years ago

2.11.0

9 years ago

2.10.2

9 years ago

2.10.1

9 years ago

2.10.0

9 years ago

2.9.10

9 years ago

2.9.9

9 years ago

2.9.8

9 years ago

2.9.7

9 years ago

2.9.6

9 years ago

2.9.5

9 years ago

2.9.4

9 years ago

2.9.3

9 years ago

2.9.2

9 years ago

2.9.1

9 years ago

2.9.0

9 years ago

2.8.15

9 years ago

2.8.14

9 years ago

2.8.13

9 years ago

2.8.12

9 years ago

2.8.10

9 years ago

2.8.9

9 years ago

2.8.8

9 years ago

2.8.7

9 years ago

2.8.6

9 years ago

2.8.5

9 years ago

2.8.4

9 years ago

2.8.3

9 years ago

2.8.2

9 years ago

2.8.1

9 years ago

2.8.0

9 years ago

2.7.15

9 years ago

2.7.14

9 years ago

2.7.13

9 years ago

2.7.12

9 years ago

2.7.11

9 years ago

2.7.10

9 years ago

2.7.9

9 years ago

2.7.8

9 years ago

2.7.7

9 years ago

2.7.6

9 years ago

2.7.5

9 years ago

2.7.4

9 years ago

2.7.3

9 years ago

2.7.2

9 years ago

2.7.1

9 years ago

2.7.0

9 years ago

2.6.0

9 years ago

2.5.0

9 years ago