Fullcalendar获取日期和时间&步进

时间:2018-05-22 11:33:11

标签: javascript jquery node.js fullcalendar

我正在使用FullCalendar进行项目,我使用步进器。 第一步:选择时间/日期(日历) 第二步:选择日期和时间的详细信息以及资源(此处为教练) 第三步:付款

点击

后,我可以恢复日期,时间和资源
dayClick: function (date, jsEvent, view, resources) {

            alert('Clicked on: ' + date.format());
            alert('Clicked on: ' + resources.title);
        }

但是,如何在步骤1中获取日期和时间并将其发送到第2步?等等?

谢谢

***Edit :*** 
@ADyson Hello, I still have a question. I'm trying to send the resource I'm clicking, but I have errors that appear 'Maximum call stack size exceeded'. I can recover the date and time but not the resource

    `$.ajax({
             type: "POST",
                    url: "/booking/test",
                    data: { dateClicked: date.format('DD-MM-YYYY HH:MM'), resourcesClicked: resources },
                    success: function () {
                        console.log('Data send to the back-end !')
                        $('#modalDateAndTime').html(date.format('DD-MM-YYYY HH:MM:SS'));
                        $('#modalCoach').html(resources.title);
                        $('#fullCalModal').modal();

                        return false;
                    }
                })`



`app.post('/booking/test', function (req, res) {
  const dateClick = req.body.dateClicked;
  const resourceClick = req.body.resourcesClicked;
  console.log("Date: " + dateClick);
  console.log("Coach: " + resourceClick);
  res.render('booking/calendar', {
    dateClick
  })

});`

谢谢

0 个答案:

没有答案