iPhone Style Calendar In Native JavaScript – iCalendar

Category: Date & Time , Javascript | July 22, 2019
Author: nickknezevich
Views Total: 124
Official Page: Go to website
Last Update: July 22, 2019
License: MIT

Preview:

iPhone Style Calendar In Native JavaScript  – iCalendar

Description:

iCalendar is a vanilla JavaScript library to render an iPhone-style calendar similar to the legacy iOS calendar UI component.

How to use it:

Insert the JavaScript iCalendar.js and Stylesheet iCalendar.css into the document.

<link href="css/iCalendar.css" rel="stylesheet">
<script src="js/iCalendar.js"></script>

Render a calendar in the desired container.

<div id="calendar"></div>
var iCal = new iCalendar('calendar');
iCal.render();

Listen to calendar date selected event (Get the selected date).

document.addEventListener('iCalendarDateSelected', function(event) {
  console.log(iCal.selectedDate);
});

You Might Be Interested In:


Leave a Reply