Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:23:40+00:00 2026-06-17T13:23:40+00:00

I am using full calendar and when we click on next month/year all table’s

  • 0

I am using full calendar and when we click on next month/year all table’s td field is refreshed.

When all data is refreshed I also want that the onClick should also get the new data.

The code for refreshing is below

 function updateCells(firstTime) {
//alert('called');
var startYear = t.start.getFullYear();
var today = clearTime(new Date());
var cell;
var date;
var row;
subTables.each(function(i, _sub){
var d = cloneDate(t.start);
d.setFullYear(d.getFullYear(),i,1);
d.setFullYear(d.getFullYear(),i,1-d.getDay());
$(_sub).find('td').each(function(ii, _cell) {

    cell = $(_cell);
    if (d.getMonth() == i) {
        cell.removeClass('fc-other-month');
    }else{
        cell.addClass('fc-other-month');
    }
    if (+d == +today && d.getMonth() == i) {
        cell.addClass(tm + '-state-highlight fc-today');
    }else{
        cell.removeClass(tm + '-state-highlight fc-today');
    }
    cell.find('div.fc-day-number').text(d.getDate());
    cell.find('div.fc-day-number').setAttribute('onClick','clicked("' + d.getDate() + '"');
    //document.getElementsByTagName('div.fc-day-number').setAttribute('onClick','clicked("' + d.getDate() + '"');
    addDays(d, 1);
});
});
bodyRows.filter('.fc-year-have-event').removeClass('fc-year-have-event');
 }

The error is

TypeError: document.getElementsByTagName(...).setAttribute is not a function

Does anybody knows how to set the new data in onClick event.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:23:41+00:00Added an answer on June 17, 2026 at 1:23 pm

    The getElementsByTagName() function returns a NodeList, which is a collection of nodes, so you’ll need to iterate over it and act on each one separately.

    var nodes = document.getElementsByTagName(...);
    for(var i = 0; i < nodes.length; i++) {
        var node = nodes[i];
        node.setAttribute(...);
    }
    

    Though I don’t believe that function is designed or intended to work with a full selector, only a tag name (so 'div' and not 'div.fc-day-number').

    You could, instead, do it this way:

    cell.find('div.fc-day-number').off('click').click(function(e) {
       clicked(d.getDate());
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using full calendar. It is working fine in all browsers but in
I'm using the Jquery full calendar plugin, and i want to be able to
I'm using jQuery ui Datepicker to display a yearly inline calendar full of special
I'm using Full Calendar with draggable events . I have specified a url in
I'm using a jQuery full calendar to show leaves taken by people which are
I want to override the event render function in full calendar. My situation is
I am currently using the Full Calendar JQuery plugin on my webpage. I am
I am using jQuery Full calendar. But I am not getting how to set
I am using jquery full calendar and one of the things it has is
I'm using Fullcalendar and when I click on the prev or next buttons, on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.