Skip to content

ryanrombough/momentous

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Momentous

A datepicker for bootstrap built with Moment.js

Install via Bower

bower install momentous

If you have not done so already, also install Momentous dependencies: Jquery, Moment.js, and Bootstrap.

bower install jquery moment bootstrap

Include jquery.js, moment.js, bootstrap.js, and bootstrap.css tags into your HTML

Basic Usage

Include momentous.js and momentous.css then create a placeholder.

<div id="placeholder"></div>

Create a momentous instance by passing the id of your placeholder.

var momentous = Momentous( $('#placeholder') );

Initialize with options

var options = {
  dateFormat: 'MM-DD-YYYY', // Any valid moment.js display format.
  date: '04-21-2013', // Must match date format
  weekStart: 1, // Sunday: 0, Monday: 1
  granularity: 'days' // 'days', 'weeks', 'months', or 'years' Defaults to days.
};

var momentous = Momentous( $('#placeholder'), options);

Events

momentous.events.on('dateChange', function(event) {
  console.log(momentous.curDate);
});

About

A datepicker for bootstrap built with Moment.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published