How to use the @fullcalendar/core.appendToElement function in @fullcalendar/core

To help you get started, we’ve selected a few @fullcalendar/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fullcalendar / fullcalendar / packages / daygrid / src / DayGridFillRenderer.ts View on Github external
''
    )
    trEl = skeletonEl.getElementsByTagName('tr')[0]

    if (startCol > 0) {
      appendToElement(trEl,
        // will create (startCol + 1) td's
        new Array(startCol + 1).join(EMPTY_CELL_HTML)
      )
    }

    (seg.el as HTMLTableCellElement).colSpan = endCol - startCol
    trEl.appendChild(seg.el)

    if (endCol < colCnt) {
      appendToElement(trEl,
        // will create (colCnt - endCol) td's
        new Array(colCnt - endCol + 1).join(EMPTY_CELL_HTML)
      )
    }

    let introHtml = dayGrid.renderProps.renderIntroHtml()
    if (introHtml) {
      if (isRtl) {
        appendToElement(trEl, introHtml)
      } else {
        prependToElement(trEl, introHtml)
      }
    }

    return skeletonEl
  }
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / daygrid / main.esm.js View on Github external
if (startCol > 0) {
            appendToElement(trEl, 
            // will create (startCol + 1) td's
            new Array(startCol + 1).join(EMPTY_CELL_HTML));
        }
        seg.el.colSpan = endCol - startCol;
        trEl.appendChild(seg.el);
        if (endCol < colCnt) {
            appendToElement(trEl, 
            // will create (colCnt - endCol) td's
            new Array(colCnt - endCol + 1).join(EMPTY_CELL_HTML));
        }
        var introHtml = dayGrid.renderProps.renderIntroHtml();
        if (introHtml) {
            if (dayGrid.isRtl) {
                appendToElement(trEl, introHtml);
            }
            else {
                prependToElement(trEl, introHtml);
            }
        }
        return skeletonEl;
    };
    return DayGridFillRenderer;
github fullcalendar / fullcalendar / packages / daygrid / src / DayGridFillRenderer.ts View on Github external
if (type === 'businessHours') {
      className = 'bgevent'
    } else {
      className = type.toLowerCase()
    }

    skeletonEl = htmlToElement(
      '<div class="fc-' + className + '-skeleton">' +
        '<table><tbody><tr></tr></tbody></table>' +
      '</div>'
    )
    trEl = skeletonEl.getElementsByTagName('tr')[0]

    if (startCol &gt; 0) {
      appendToElement(trEl,
        // will create (startCol + 1) td's
        new Array(startCol + 1).join(EMPTY_CELL_HTML)
      )
    }

    (seg.el as HTMLTableCellElement).colSpan = endCol - startCol
    trEl.appendChild(seg.el)

    if (endCol &lt; colCnt) {
      appendToElement(trEl,
        // will create (colCnt - endCol) td's
        new Array(colCnt - endCol + 1).join(EMPTY_CELL_HTML)
      )
    }

    let introHtml = dayGrid.renderProps.renderIntroHtml()
github fullcalendar / fullcalendar / packages / daygrid / src / DayGridFillRenderer.ts View on Github external
}

    (seg.el as HTMLTableCellElement).colSpan = endCol - startCol
    trEl.appendChild(seg.el)

    if (endCol &lt; colCnt) {
      appendToElement(trEl,
        // will create (colCnt - endCol) td's
        new Array(colCnt - endCol + 1).join(EMPTY_CELL_HTML)
      )
    }

    let introHtml = dayGrid.renderProps.renderIntroHtml()
    if (introHtml) {
      if (isRtl) {
        appendToElement(trEl, introHtml)
      } else {
        prependToElement(trEl, introHtml)
      }
    }

    return skeletonEl
  }
github fullcalendar / fullcalendar / packages / daygrid / src / DayGridEventRenderer.ts View on Github external
while (col &lt;= rightCol) {
            cellMatrix[i][col] = td
            segMatrix[i][col] = seg
            col++
          }

          tr.appendChild(td)
        }
      }

      emptyCellsUntil(colCnt) // finish off the row

      let introHtml = dayGrid.renderProps.renderIntroHtml()
      if (introHtml) {
        if (isRtl) {
          appendToElement(tr, introHtml)
        } else {
          prependToElement(tr, introHtml)
        }
      }

      tbody.appendChild(tr)
    }

    return { // a "rowStruct"
      row: row, // the row number
      tbodyEl: tbody,
      cellMatrix: cellMatrix,
      segMatrix: segMatrix,
      segLevels: segLevels,
      segs: rowSegs
    }
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / daygrid / main.esm.js View on Github external
var endCol = rightCol + 1;
        var className;
        var skeletonEl;
        var trEl;
        if (type === 'businessHours') {
            className = 'bgevent';
        }
        else {
            className = type.toLowerCase();
        }
        skeletonEl = htmlToElement('<div class="fc-' + className + '-skeleton">' +
            '<table><tbody><tr></tr></tbody></table>' +
            '</div>');
        trEl = skeletonEl.getElementsByTagName('tr')[0];
        if (startCol &gt; 0) {
            appendToElement(trEl, 
            // will create (startCol + 1) td's
            new Array(startCol + 1).join(EMPTY_CELL_HTML));
        }
        seg.el.colSpan = endCol - startCol;
        trEl.appendChild(seg.el);
        if (endCol &lt; colCnt) {
            appendToElement(trEl, 
            // will create (colCnt - endCol) td's
            new Array(colCnt - endCol + 1).join(EMPTY_CELL_HTML));
        }
        var introHtml = dayGrid.renderProps.renderIntroHtml();
        if (introHtml) {
            if (dayGrid.isRtl) {
                appendToElement(trEl, introHtml);
            }
            else {
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / daygrid / main.esm.js View on Github external
else { // a single-column segment
                        loneCellMatrix[i][col] = td;
                    }
                    while (col &lt;= rightCol) {
                        cellMatrix[i][col] = td;
                        segMatrix[i][col] = seg;
                        col++;
                    }
                    tr.appendChild(td);
                }
            }
            emptyCellsUntil(colCnt); // finish off the row
            var introHtml = dayGrid.renderProps.renderIntroHtml();
            if (introHtml) {
                if (dayGrid.isRtl) {
                    appendToElement(tr, introHtml);
                }
                else {
                    prependToElement(tr, introHtml);
                }
            }
            tbody.appendChild(tr);
        }
        return {
            row: row,
            tbodyEl: tbody,
            cellMatrix: cellMatrix,
            segMatrix: segMatrix,
            segLevels: segLevels,
            segs: rowSegs
        };
    };