Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render different events on click function on jquery week calendar without reloading the page #55

Open
Assdi opened this issue Dec 14, 2015 · 0 comments

Comments

@Assdi
Copy link

Assdi commented Dec 14, 2015

Any one please help
I want to render different events on week calendar how can i do that here is code of two click functions which is calling function that contain demo.js code

$(document).ready(function() {
$("#1st").click(function(){

  var year = new Date().getFullYear();
  var month = new Date().getMonth();
  var day = new Date().getDate();

data= [
        {
           "id":1,
           "start": new Date(year, month, day, 12),
           "end": new Date(year, month, day, 13, 30),
           "title":"Lunch with Mike"
        },
        {
           "id":3,
           "start": new Date(year, month, day + 1, 17),
           "end": new Date(year, month, day + 1, 17, 45),
           "title":"Hair cut"
        }]

        asad(data);
});

$("#2nd").click(function(){
    $('#calendar').empty();
    var year = new Date().getFullYear();
  var month = new Date().getMonth();
  var day = new Date().getDate();

    data=[{
           "id":5,
           "start": new Date(year, month, day + 1, 14),
           "end": new Date(year, month, day + 1, 15),
           "title":"Product showcase"
        },
        {
           "id":6,
           "start": new Date(year, month, day, 10),
           "end": new Date(year, month, day, 11),
           "title":"I'm read-only",
           readOnly : true
        } ]

    asad(data);
    })

});

function asad(data)
{

demo file code here

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant