簡體   English   中英

在React中將URL添加到FullCalendar

[英]Add URL to FullCalendar in React

我正在嘗試在react中將URL添加到Fullcalendar,當我單擊一個事件時,我需要用clic帶我到該單擊事件的頁面詳細信息。 瀏覽器上顯示的URL正確,但沒有任何作用,因為瀏覽器已快速刷新。 如果有人有任何想法,謝謝您的幫助。

//here some code

events.push(
            {
                title: '\n owner: '+reservation.user.fullname,
                start: reservation.start_date,
                end: reservation.end_date,
                url: '/reservation/details/' + reservation.id + '/' + reservation.space.category.name,
            },

$(document).ready(function() {

  $('#calendar').fullCalendar({
      header: {
          left: 'prev,next today',
          center: 'title',
          right: 'month,agendaWeek,agendaDay'
      },
        navLinks: true, // can click day/week names to navigate views
        editable: true,
        eventLimit: true, // allow "more" link when too many events
       events: evt,
       timezone: 'UTC',

  });

您應該使用React版本,不要將其與jQuery https://fullcalendar.io/docs/react混合使用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM