Giter Club home page Giter Club logo

gencal's Introduction

GenCal

GenCal is a javascript module that provides a monthly calendar and a DOM presentation of it.

what it is

It is a monthly calendar model, and a minimal HTML view. It is tiny. It is dependency-free. It is modular and extendable.

what it is not

It does not take an endless list of options. It does not include a reinvention of date inputs or dropdowns or popovers or bootstrap styles. It doesn't make the DOM needlessly complex. It doesn't add crappy inline styles to any elements. It doesn't care whether you're allowing the user to select a date or just showing a date or a range of dates or several nonconsecutive dates or how many calendars you want to display or when you want to display them.

modules

GenCal.Month

The core of GenCal is the model, an instance of GenCal.Month:

var month = new GenCal.Month(1999, 0); // January 1999

It has methods for getting and setting properties, and emits events on changes.

GenCal.Table

An instance of GenCal.Table takes a model and a table element, then subscribes to model updates and reflects them in the table:

var el = document.createElement('table');
var table = new GenCal.Table(month, el);

GenCal.Header

A common UI component of a monthly calendar is a header containing the name of the month and prev month/next month buttons. GenCal provides a simple implementation:

var header = new GenCal.Header(month);
document.appendChild(header);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.