Please go to 1 of the following pages to see the demonstration
-
IIFE (immediately invoked function expression) example. This is just dropping the script into an html file.
This example includes the ability to see native datepickers side by side with the polyfill in browsers which support <input type="date">
-
ESM (ECMAScript modules) with dynamic loading. This will require some kind of bundler (such as Webpack, Browserify, or as in this case Rollup).
This ensures only a tiny script is loaded by modern browsers, while older browsers download the full polyfill.