I am brand new to Fullcalendar. It looks promising. However, I have a usability issue bordering on "bug" which makes the module unusable for me.

I would have expected that a user could click on a day in any of the views, making that a "current date". Then they should be able to switch between the views with that date always showing. As it is, whenever you switch views, the view returns to the default date (set to the current time). If you want to look at the day view of something 6 weeks into the future, you must select the day view then click forward 42 times (6 weeks x 7 days). I can find no other way to get there.

The appearance is that it is not possible to even select a day. At least there is no UI feedback to indicate that a date has been selected. Maybe this is my real problem.

Hopefully I'm just doing something silly.

Comments

tim.plunkett’s picture

Status: Active » Postponed (maintainer needs more info)

If I click "next month" three and then click "Day", I see Sunday January 1, 2012. Which is the sunday 3 months from now.
Does this not work for you?

David4514’s picture

Ok... I did not notice that.

To navigate to a day in the future is still a little odd. Yes, I can first navigate to the month in question, switch to week view which will show the week that contains the first day of the month. Then I can then go forward until I arrive at the week in question and switch to day view. Which will now show the first day of the week. I can then navigate forward a day at a time to get to the date.

It seems like you should be able to click on the date in question in the month view and go directly to that date.

I think that I am missing something though. If I click on the "Today" button, the current date is highlighted. When I switch between the three views (month, week, and day) that current day is automatically included in all three views.

There must be some way to mark a date other than today's date as the "active" date. I have not found a way to do that.

tim.plunkett’s picture

You know you can set a custom default date, right? Under FullCalendar settings, Time/Date.

Also, there is a possibility for new functionality around clicking on a day: http://arshaw.com/fullcalendar/docs/mouse/dayClick

David4514’s picture

The custom date option will not help with allowing the user to set the active date by clicking on a date.

The dayClick option looks more interesting. While my PHP skills are growing by leaps, Java and I have had little experience.

Googling and combining some ideas I came up with something like the following inserted after line 41 of fullcalendar.views.js:

        dayClick: function(date, allDay, jsEvent, view) {
        if (allDay) {
            alert('Clicked on the entire day: ' + date);
            jQuery('#calendar').fullCalendar('gotoDate', date);
            }
        },

I get the popup alert which shows that I have the correct date. I have no clue as to how to call the .fullCalendar('gotoDate', date) function. I blindly tried a few options, but I am totally out of my element here.

tim.plunkett’s picture

dayClick: function(date, allDay, jsEvent, view) {
  if (allDay) {
    view.calendar.gotoDate(date);
    view.calendar.changeView('agendaDay');
  }
},

You can add this in as a separate module, no need to hack fullcalendar to do this. Documentation on how to do that is forthcoming.

David4514’s picture

Thanks, #5 does the trick! I'll look to putting my custom code in a separate file.

aspilicious’s picture

Status: Postponed (maintainer needs more info) » Fixed

See http://drupal.org/node/1342772 for a better approach

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.