Beautiful Pure JavaScript Date Picker With Events Support – Datepickk.js

Category: Date & Time , Javascript , Recommended | August 14, 2018
Views Total:8,382 views
Official Page:Go to website
Last Update:August 14, 2018


Beautiful Pure JavaScript Date Picker With Events Support – Datepickk.js


Datepickk.js is a JavaScript library which allows you select a date or date range from a date picker popup or inline calendar, with support for custom events.

How to use it:

Include the stylesheet datepickk.min.css and JavaScript file datepickk.min.js on the webpage.

<link rel="stylesheet" href="dist/datepickk.min.css">
<script src="dist/datepickk.min.js"></script>

Initialize the date picker and we’re ready to go.

var datepicker = new Datepickk();

Show a default date picker on the webpage.;

Available options to customize the date picker.

// Allows to select a range of two dates
datepicker.range = false;
datepicker.maxSelections = null;
// Displays the date picker into a specific container
datepicker.container = document.body;
datepicker.opened = false;
// Displays multiple months at once
datepicker.months = 1;
// If a date gets selected the datepicker will close
datepicker.closeOnSelect = false;
datepicker.button = null;
datepicker.title = null;
// Callbacks
datepicker.onClose = null;
datepicker.onConfirm = null;
datepicker.onSelect = null;
// If someone clicks outside the datepicker it closes
datepicker.closeOnClick = true;
// Inline mode
datepicker.inline = false;
// You can change the language and the day the week starts by changing the lang property.
// By default i've added 3 languages: English (en), Norwegian (no), German (de). 
// Add your own languages to the 'languages' property in the source code
datepicker.lang = 'en';
// You can disable spesific days
datepicker.disabledDates = [];
datepicker.disabledDays = [];
// Allows to mark stuff in the date picker
datepicker.highlight = [];
// Mark tooltips
datepicker.tooltips = {};
// Show/hide daynames line
datepicker.daynames = true; = true;
// Show little line on todays date
datepicker.startDate = null;
datepicker.minDate = null;
datepicker.maxDate = null;
// Locks the datepicker (viewonlymode)
datepicker.locked = false;


// shows date picker;
// hides date picker
// selects a date
datepicker.selectDate(new Date());
// unselects a date
datepicker.unselectDate(new Date());
// unselect all



  • fix(es6 import): adding support for es6 imports + switching to webpack

You Might Be Interested In:

Leave a Reply