Code Monkey home page Code Monkey logo

vanilla-calendar's Introduction

Vanilla JS Calendar ๐Ÿฆ

Usage

<div id="v-cal">
  <div class="vcal-header">
    <button class="vcal-btn" data-calendar-toggle="previous">
      <svg height="24" version="1.1" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
        <path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"></path>
      </svg>
    </button>

    <div class="vcal-header__label" data-calendar-label="month">
      March 2017
    </div>

    <button class="vcal-btn" data-calendar-toggle="next">
      <svg height="24" version="1.1" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
        <path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z"></path>
      </svg>
    </button>
  </div>

  <div class="vcal-week">
    <span>Mon</span> <span>Tue</span><span>Wed</span> <span>Thu</span> <span>Fri</span> <span>Sat</span> <span>Sun</span>
  </div>
  <div class="vcal-body" data-calendar-area="month"></div>
</div>
<script src="vanillaCalendar.js" type="text/javascript"></script>
<script>
window.addEventListener('load', function () {
  vanillaCalendar.init();
})
</script>

Development

  1. Install dependencies
npm install
  1. Watch JS/CSS
npm run watch

I encourage everyone to hack away at this!

This isn't ready to be used in a production application out the box, it's more of a hacked together project. Fork it and make it better!

vanilla-calendar's People

Contributors

chrissy-dev avatar alperklc avatar bennias avatar

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.