Bulma's extension to display a calendar. It can be used on page as large calendar with apointments or in modal/popup for datepicker. (find all my bulma's extensions here)
date = new bulmaCalendar(document.querySelector('.sr-date'), {
dataFormat: 'd MM yyyy' // 1 January 2018
});
where dataFormat
is a string with a combination of this values:
d: short day (1-31)
dd: long day (00-31)
D: weekday (es: Monday)
m: short month (1-12)
mm: long month (01-12)
M: short month name (es: Jan, Feb)
MM: full month name (es: January)
yy: short year (18)
yyyy: full year (2018)
date = new bulmaCalendar(document.querySelector('.sr-date'), {
lang: 'it' // one of: en (default), fr, de, tr, it, th, pt-BR
});
Here's the options object and the default values as appears on code.
var defaultOptions = {
startDate: new Date(),
// the default data format `field` value
dateFormat: 'yyyy/mm/dd',
// internationalization
lang: 'en',
overlay: false,
closeOnSelect: true,
// callback function
onSelect: null, // callback(new Date(year, month, day))
onOpen: null, // callback(this)
onClose: null, // callback(this)
onRender: null // callback(this)
};
You can find the Documentation and a demo here