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 7042369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:09:36+00:00 2026-05-28T02:09:36+00:00

I understand that according to this issue ticket on google code http://code.google.com/p/fullcalendar/issues/detail?id=143 that there

  • 0

I understand that according to this issue ticket on google code http://code.google.com/p/fullcalendar/issues/detail?id=143 that there is a soloution floating around, however I cant seem to find it.

I am wondering if anyone knows how to show a red solid line on the current time on the calendar

  • 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-05-28T02:09:36+00:00Added an answer on May 28, 2026 at 2:09 am
    function setTimeline(view) {
        var parentDiv = jQuery(".fc-agenda-slots:visible").parent();
        var timeline = parentDiv.children(".timeline");
        if (timeline.length == 0) { //if timeline isn't there, add it
            timeline = jQuery("<hr>").addClass("timeline");
            parentDiv.prepend(timeline);
        }
    
        var curTime = new Date();
    
        var curCalView = jQuery("#calendar").fullCalendar('getView');
        if (curCalView.visStart < curTime && curCalView.visEnd > curTime) {
            timeline.show();
        } else {
            timeline.hide();
            return;
        }
    
        var curSeconds = (curTime.getHours() * 60 * 60) + (curTime.getMinutes() * 60) + curTime.getSeconds();
        var percentOfDay = curSeconds / 86400; //24 * 60 * 60 = 86400, # of seconds in a day
        var topLoc = Math.floor(parentDiv.height() * percentOfDay);
    
        timeline.css("top", topLoc + "px");
    
        if (curCalView.name == "agendaWeek") { //week view, don't want the timeline to go the whole way across
            var dayCol = jQuery(".fc-today:visible");
            var left = dayCol.position().left + 1;
            var width = dayCol.width()-2;
            timeline.css({
                left: left + "px",
                width: width + "px"
            });
        }
    
    }
    

    And then in the setup:

    viewDisplay: function(view) {
            try {
                setTimeline();
            } catch(err) {}
        },
    

    and in the css:

    .timeline {
        position: absolute;
        left: 59px;
        border: none;
        border-top: 1px solid red;
        width: 100%;
        margin: 0;
        padding: 0;
        z-index: 999;
    }
    

    Only tried this on week-view since that’s all I use.

    Good luck.

    Edit:

    To get the timeline to update during the day you could try something like this in the viewDisplay:

    viewDisplay: function(view) {
                if(first){
                    first = false;
                }else {
                    window.clearInterval(timelineInterval);
                }
                timelineInterval = window.setInterval(setTimeline, 300000);
                try {
                    setTimeline();
                } catch(err) {}
            },
    

    You will need to set first=true in the top of the tag. This will move the timeline every 300 second = 5 minutes. You can lower it if you need it more smooth..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that according to pigeonhole principle, if number of items is greater than
I understand that according to the HTML specification, it's invalid to add custom attributes
I understand that there are several ways to blend XNA and WPF within the
I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. Major is
I understand that according to Rails philosophy, data integrity checks should be done at
If I need to go from this service contract: [ServiceContract(Namespace=http://api.x.com/Svc1)] public interface IService1 {
I did some digging and I understand that the array means there are multiple
I understand that are similar question on StackOverflow about this problem, but none of
I understand that only one instance of any object according to .equals() is allowed
There are several packages in my application that user can select each one according

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.