Code Monkey home page Code Monkey logo

bic_calendar_full's Introduction

BIC Calendar

ca - BIC Calendar es un simple calendari per marcar esdeveniments. Un plugin de jQuery i Twitter Bootstrap.

en - BIC Calendar is a simple calendar to mark events, a jQuery plugin and Twitter Bootstrap.

Dependencias

  • ~jQuery 1.7.2
  • ~Twitter Bootstrap 2.0

Options

  • popoverOptions (popover Twitter Bootstrap object)

  • tooltipOptions (tooltip Twitter Bootstrap object)

  • dayNames (array)

    • default: ["l", "m", "x", "j", "v", "s", "d"]
  • monthNames (array)

    • default: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"]
  • showDays (boolean)

    • default: true
  • reqAjax (json array of event array)

    • reqAjax.type (string) {'get', 'post'}
    • reqAjax.url (string)
  • events (array of event array)

    • ex:
    var events = [
        {
            date: "28/10/2013",
            title: 'SPORT & WELLNESS',
            link: '',
            color: '',
            content: '<img src="http://gettingcontacts.com/upload/jornadas/sport-wellness_portada.png" ><br>06-11-2013 - 09:00 <br> Tecnocampus Mataró Auditori',
            class: '',
        }
    ];

Use example for the calendar

$(document).ready(function() {

    var monthNames = ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Dicembre"];

    var dayNames = ["L", "M", "M", "J", "V", "S", "D"];

    var events = [
        {
            date: "28/10/2013",
            title: 'SPORT & WELLNESS',
            link: '',
            color: '',
            content: '<img src="http://gettingcontacts.com/upload/jornadas/sport-wellness_portada.png" ><br>06-11-2013 - 09:00 <br> Tecnocampus Mataró Auditori',
            class: '',
        }
    ];

    $('#calendari_lateral1').bic_calendar({
        //list of events in array
        events: events,
        //enable select
        enableSelect: true,
        //enable multi-select
        multiSelect: true,
        //set day names
        dayNames: dayNames,
        //set month names
        monthNames: monthNames,
        //show dayNames
        showDays: true,
        //set ajax call
        reqAjax: {
            type: 'get',
            url: 'http://bic.cat/bic_calendar/index.php'
        }
        //set popover options
        //popoverOptions: {}
        //set tooltip options
        //tooltipOptions: {}
    });
});

Use example for the calendar events

$(document).ready(function() {
    document.addEventListener('bicCalendarSelect', function(e) {
        alert('Hi dude! You selected from ' + e.detail.dateFirst + 'to' + e.detail.dateLast + '. Do whatever you want with these dates.');

        //maybe you would like to send these data by ajax...
        //$.ajax...

        //or asign to a form...
        //$('input').val(...
    });
});

TODO

- Clear documentation
- Add all options

More info

This is just an improved fork of http://bic.cat/bic_calendar. For more info you could check it and its branches.

Showcase

http://bic.cat/bic_calendar_full

bic_calendar_full's People

Contributors

bichotll avatar

Watchers

 avatar  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.