Skip to content

Installation

Dionlee Uy edited this page Oct 2, 2020 · 3 revisions

NPM

Install via npm:

npm i @dmuy/datepicker

Include in your app

import '@dmuy/datepicker/dist/duDatepicker.css'
import duDatepicker from '@dmuy/datepicker'

Old version (with jQuery dependency)

CDN

Use the following if you don't want to host the js and css files:

https://unpkg.com/@dmuy/datepicker@{version}/dist/duDatepicker.css
https://unpkg.com/@dmuy/datepicker@{version}/dist/duDatepicker.js
https://cdn.jsdelivr.net/gh/dmuy/duDatepicker@{version}/dist/duDatepicker.css
https://cdn.jsdelivr.net/gh/dmuy/duDatepicker@{version}/dist/duDatepicker.js

For production, use the minified version by adding .min to the file name (i.e. duDatepicker.min.js)

Note: Replace {version} with the version you want to use.

Self Hosting

Copy duDatepicker.css and duDatepicker.js (or the minified versions *.min.js and *.min.css) in the dist folder and include in your app:

<link rel="stylesheet" type="text/css" href="{path-to}/duDatepicker.css">
<script type="text/javascript" src="{path-to}/duDatepicker.js"></script>

Note: Replace {path-to} with the absolute or relative path to where you copied the css and js files.

Clone this wiki locally