add birthday events into jQuery full calendar each year

China☆狼群 提交于 2019-12-02 06:17:25

Well the easiest solutions may be to alter your PHP loop and add "multiple" years to your events.

while ($birthday_row = $birthday_r->fetch_row()){
    $yearBegin = date("Y");
    $yearEnd = $yearBegin + 10; // edit for your needs
    $years = range($yearBegin, $yearEnd, 1);

    foreach($years as $year){
        $birthday_array[] = array(
            'title' => $birthday_row[0],
            'start' => $year . "-" . $birthday_row[1] . "-" . $birthday_row[2]
        );
    }
}

Two drawbacks :

  • you can't manage different birthdays (so a person's birthdate may occur, even after his dead)
  • it leeds into exponential costs

You may also take a look at the demo with repeating events to build a frontend solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!