I've been thinking about the possibility of setting up a trigger to display something (like an alert, Qtip message, or any other notification) when today's date coincides with an event on my FullCalendar. Currently, I'm using XML from my Google calendar as the data source and would like to have notifications popping up for people's birthdays.
So far, I've implemented the following code snippet:
var difference = birthdate - today;
var days = Math.round(difference/(1000*60*60*24));
if (days == 0){
$('#tabs').qtip({
position: {
my: 'bottom right',
at: 'top left',
},
content: "It's someone's birthday!!!",
show: {
when: false,
ready: true
},
hide: false,
style: {
classes: 'ui-tooltip-rounded',
}
});
}
The variable birthday stores each individual's birthdate that I define in the script, while today represents the current date. However, I realize that this method is not very dynamic since I need to set it up separately for each person.
Thank you in advance for your help.