Skip to content

Crinsane/bulma-calendar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bulma-calendar

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)

npm npm Build Status

Examples

Date format

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)

Language

date = new bulmaCalendar(document.querySelector('.sr-date'), {
  lang: 'it' // one of: en (default), fr, de, tr, it, th, pt-BR
});

Other options

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

Documentation & Demo

You can find the Documentation and a demo here

About

Bulma's extension to display a calendar

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 86.8%
  • CSS 13.2%