| Issue 52: | Add or hide some an event... | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
1.2.1
Please provide any additional information below.
Hi.
i want to add 2 checkbox to the calendar ,the checkbox if the are checked
will show or hide some events.
The problem is that i don't know how to do that .
this is my code.
events: [
$(":checkbox").click(function(){
{
id: 1,
title: "Long Event",
start: new Date(y, m, 6, 14, 0),
end: new Date(y, m, 11)
},
});
{
id: 2,
title: "Repeating Event",
start: new Date(y, m, 2)
},
{
id: 2,
title: "Repeating Event",
start: new Date(y, m, 9)
},
{
id: 3,
title: "Meeting",
start: new Date(y, m, 20, 9, 0)
},
{
id: 4,
title: "Click for Facebook",
start: new Date(y, m, 27, 16),
end: new Date(y, m, 29),
url: "http://facebook.com/"
}
]
});
so here i want to add event (id :1)after clicking on the checkbox but it
doesn't worked.
Thanke you for your help
Jul 22, 2009
But i can't do this because when i will clik on a checkbox a new calendar will be created so on my page i will have more than one calendar ... Any way i will try what you proposed to me and i will tell you... Thank you for your help
Dec 15, 2009
adam what I want to know is why this code you supply wont work anymore?
$("#addEvent").click(function(){
$('#calendar').fullCalendar('addEvent', {
title: 'event title',
start: '2009-07-18'
});
});
same thing diffrent click of an element. Give error of in FF
z.data(this, "fullCalendar")[X] is undefined
http://www.localhost.com/fullcalendar/fullcalendar.min.js
Dec 19, 2009
since v1.3, addEvent no longer exists, use renderEvent instead
Jul 6, 2010
Hi, is it possible to write these code into string and assign to event array? var event1 ="title: "Long Event", start: new Date(y, m, 6, 14, 0), end: new Date(y, m, 11)"; |
|
| ► Sign in to add a comment |
your code doesn't make much sense (you cant have a jquery object $(":checkbox") in the events array). might want to beef up on the JS concepts a bit, as well as look at the docs for addEvent and removeEvent: http://arshaw.com/fullcalendar/docs/#calevent- objects will end up looking something like this: $(":checkbox").click(function(){ $('#calendar').fullCalendar('addEvent', { title: 'event title', start: '2009-07-18' }); }); hope this helps, adam