Skip to content

ranjanngc/am-calendar

Repository files navigation

am-calendar

A very simple calendar web component

Uses

<am-calendar theme="dark"></am-calendar>

alt text

<am-calendar></am-calendar>

alt text

Event

am-change : The event is dispatched with selected data when clicked on a date cell.

HTML

<script type="module" language="text/javascript" src="public/am.calendar.js"></script>  

<am-calendar id="calc"></am-calendar>

JS

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);

Contribution

Start with installing dependencies

npm i

Try the demo app by running dev server

npm run start

Contribute, test and build

npm run build

About

Simple calendar web component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published