Skip to content

Calendar

An embeddable date picker for single dates, ranges and times. Render it inline, as a popup, or bound to an input. Pick a start and an end date below.

Pick a start and an end date

<html>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@calendarjs/ce/dist/style.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@calendarjs/ce/dist/index.min.js"></script>

<div id="root"></div>
<p id="output">Pick a start and an end date</p>

<script>
const { Calendar } = calendarjs;

Calendar(document.getElementById('root'), {
    type: 'inline',
    range: true,
    onchange: function(self, value) {
        if (value) {
            document.getElementById('output').textContent = value[0] + ' to ' + value[1];
        }
    }
});
</script>
</html>
  • Single dates, ranges and times: one component for every date input
  • Inline, popup or input-bound: render it where you need it
  • Keyboard navigation: arrows, Enter and Escape for fast input
  • Validation: restrict selectable dates with validRange
  • Formats: display and parse custom date formats
  • Internationalization: translated month and weekday names
  • Events: onchange, onupdate, onopen and onclose callbacks
  • Hotel and vacation booking
  • Checkout and delivery dates
  • Report and analytics date filters
  • Leave and vacation request forms
  • Meeting time pickers

Calendar documentation