[this isn't by me, i just created a package.json added it to the npm repo for convenience, everything is a direct copy of the original code on github]
AngularJS Tiny Calendar
A (very) small calendar directive, which can also handle events
Demo
Installation
Dependencies
The Tiny Calendar requires:
- AngularJs 1.2.8+
- Moment.js
- Moment-range.js
Bower
Install it via Bower
bower install --save angular-tiny-calendar
include tiny-calendar.min.js
and tiny-calendar.min.css
into your project
<!-- Include css reference inside the <head> tag--><!-- ... --> <!-- Load the scrips at the end of the body --><!-- AngularJs and Moment.js are required --> <!-- ... --><!-- Include js reference -->
add angular-tiny-calendar
as a module dependency for your app.
angular;
Usage
Simply add a tiny-calendar
attribute to a <div>
tag (or any container)
Options
Tiny Calendar accepts 4 parameters:
first-day (number)
first-day
is used to set the first day of the week (default is 0 - Sunday).
<!-- This will set the first day on Monday -->
week-days (string)
week-days
is used to customize the labels of the days (remember to start with Sunday even if first-day
is set)
today (string)
today
sets the label for the today button
events (object)
The events
argument must be passed an array of objects, each one including:
title
- Required. The title of the event.startDate
- Required. The date of the event.endDate
- Optional. The end date of the event.time
- Optional. The day schedule of the event. If this is omitted the event will be considered "all day long"
events:
License
This sowftware is licensed under the MIT license