A very simple calendar web component
<am-calendar theme="dark"></am-calendar>
<am-calendar></am-calendar>
am-change
: The event is dispatched with selected data when clicked on a date cell.
<script type="module" language="text/javascript" src="public/am.calendar.js"></script>
<am-calendar id="calc"></am-calendar>
function handle(ev){
var dtStr = "year:" + ev.detail.data.year + " month:" + ev.detail.data.month + " day:" + ev.detail.data.day;
console.log(dtStr);
}
var cal = document.getElementById("calc");
cal.addEventListener("am-change",handle);
Start with installing dependencies
npm i
Try the demo app by running dev server
npm run start
Contribute, test and build
npm run build