Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.93 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.93 KB

edtf-datepicker

Human friendly widget to produce dates as EDTF strings

Acknowledgements

This datepicker is derived work from version 1.9.0 of uxsolutions/bootstrap-datepicker, licensed under Apache License v2.0.

It also has a strict depency on EDTF.js, licensed under AGPL v3.0.

Requirements

Development

Once you cloned the repo, you'll need to install grunt and the development dependencies using a package manager:

  • yarn (recommended):
$ [sudo] yarn global add grunt-cli
$ yarn install
$ [sudo] npm install --global grunt-cli
$ npm install

To build the project, simply run:

$ npm run build

Special notes on the EDTF dependency

While the widget in itself has been developed in ES5, it depends on the EDTF.js parser, as registered in the package.json file. This library has been developed using ES6 features, and more specifically, extends JavaScript built-ins such as the Date element, which is not supported by older browsers, and only partially transformed by Babel. Therefore, this datepicker might not function well on older browsers, but feel free to open issues about it.

Moreover, the EDTF.js software being licensed as AGPL-3, it is not included in the dist/js directory as-is, but a simple grunt browserify command will generate an edtf.js file (and an edtf.opt.js file if the former does not work) in the assets folder that can be used if needed. (this file is generated when building and required for the index.html demonstration page to function)