2017-06-07 5 views
2

私は医師の予約を取るために私のウェブサイトでjQuery FullCalendarとスケジューラーを使用しています。ここで、営業時間とスロット時間は、選択された診療所支店の勤務時間と部門所要時間に基づいて動的に拘束されます。したがって、この勤務時間とスロットの継続時間に基づいて、営業時間が終了したり、タイムスロットの半分をカバーして開始したりします。だから私たちはそのタイムスロットを使うことができず、その部門は保留中の時間の予定を失うでしょう。これにはどんな解決策がありますか? Here we can not use the time slot 12:00pm because the duration is 45 minutes and the working hours ends at 12.30. So there is a lose of 15 minutesJquery Fullカレンダースロットの期間と営業時間の問題

答えて

0

スロットの持続時間が60分を超えると、カレンダーコントロールでイベントセルが正しく表示されないという同様の問題が発生しました。私はStackOverFlowから以下の解決策を得ました。あなたには役立つかもしれませんが、行ってください。 fullCalendarイベントハンドラの下の関数を呼び出します。

function resetCalendarHeight() { 
// reset height and contentHeight properties on month view 
if (isNullOrEmpty($('.fc-slats')) || $('.fc-slats').length == 0) { 
    $('#calendar').css('height', '530px'); 
    //$('.fc-row.fc-week.fc-widget-content').css('height', '76'); 
    $('#calendar').fullCalendar('option', 'contentHeight', 'undefined'); 
    return false; 
} 
// day view or week view set the content height to 'auto' 
// then adjust the height of the container 
$('#calendar').fullCalendar('option', 'contentHeight', 'auto'); 
var bottomDifference = $('#calendar-container')[0].getBoundingClientRect().bottom - $('.fc-slats')[0].getBoundingClientRect().bottom; 
var currentHeight = $(".fc-slats > table").css("height").replace('px', ''); 
var newHeight = parseInt(currentHeight) + bottomDifference; 
$(".fc-slats > table").css("height", newHeight); 
$('.fc-scroller.fc-time-grid-container').css('overflow-x', 'auto'); 
$('.fc-scroller.fc-time-grid-container').css('overflow-y', 'overlay'); 
$('.fc-scroller.fc-time-grid-container').css('height', newHeight); 
return true;} 



$('#calendar').fullCalendar({ 
slotDuration:'45', 
    events: function (start, end, timezone, callback) { 
      resetCalendarHeight(); 
    }}) 
関連する問題