igorsoaresassis / jmonthcalendar

Automatically exported from code.google.com/p/jmonthcalendar
Other
0 stars 0 forks source link

Today Link #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Click on Today link
2. -> Get the events for today's month (ajax or static) on onMonthChanging

What is the expected output? What do you see instead?

Events should display in the calendar but nothing appears and the other month 
events don't appear anymore when clicking next/prev.
However, when only using next/prev (without clicking on today before), the 
events are displayed...

What version of the product are you using? On what operating system?
1.3.1 beta

Please provide any additional information below.

simple ex : 

                onMonthChanging: function(dateIn) {
                    var events = [  { "EventID": 1, "StartDateTime": "new Date(2009, 6, 1)", "EndDateTime": "new Date(2009, 6, 3)", "Title": "10:00 
pm - EventTitle1", "URL": "#", "Description": "This is a sample event 
description" },
                            { "EventID": 2, "StartDateTime": "new Date(2009, 6, 7)", "EndDateTime": "new Date(2009, 6, 7)", "Title": "10:00 pm - 
EventTitle6", "URL": "#", "Description": "This is a sample event description" }
                    ];
                    $.jMonthCalendar.ReplaceEventCollection(events);
                    return true;
                }

Original issue reported on code.google.com by yefrederic on 24 Jul 2009 at 1:19

GoogleCodeExporter commented 8 years ago
I fixed this by adding in the js file : 

        var todayLink;
        if(defaults.navLinks.enableToday) {
            //Create Today link for later
            todayLink = jQuery('<div class="TodayLink"><a href="" class="link-today">'+ defaults.navLinks.t 
+'</a></div>').click(function() {
                jQuery.J.ChangeMonth(new Date().clearTime());
                return false;
            });
        }

instead of : 

        var todayLink;
        if(defaults.navLinks.enableToday) {
            //Create Today link for later
            todayLink = jQuery('<div class="TodayLink"><a href="" class="link-today">'+ defaults.navLinks.t 
+'</a></div>').click(function() {
                jQuery.J.ChangeMonth(new Date());
                return false;
            });
        }

Original comment by yefrederic on 24 Jul 2009 at 3:24

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r70.

Original comment by k.leneau@gmail.com on 8 Apr 2010 at 7:12