[FullCalendar 2] Dayclick event

[FullCalendar 2] Dayclick event

  
Forge Component
(9)
Published on 23 Mar by Grazina
9 votes
Published on 23 Mar by Grazina
Hi,

I'm trying to change this component to add the feature to catch the dayClick event. I'm adding something like the code that I have below in the jQuery of the component. It works fine and notify me with the expected behaviour but in chrome I have the following error:
Uncaught InvalidStateError: Failed to read the 'selectionDirection' property from 'HTMLInputElement': The input element's type ('hidden') does not support selection. 

What I'm doing wrong?

Thanks.

Best Reggards,
Nuno Mendes

// Clicking & Hovering dayClick
            dayClick: function(date, calEvent, jsEvent, view) {
                var calEventJS = {
                    action:""dayclick"",
                    range:{
                        start:date.format(),
                        end:date.format()
                    },
                    delta:undefined,
                    event:calEvent
                };
                $('#"+e_cal.Id+"').val(safeJsonStringify(calEventJS));
                $('#"+link_notify.Id+"').click();

                "+Callback_DayClick+"
            }

Hi Nuno,

You have more parameters than dayClick can hold!
Check out the structure of the dayClick callback: http://fullcalendar.io/docs/mouse/dayClick/
It is waiting for date, jsEvent, view.

Anyway I've added this new callback to the component, now you can use it directly like the other events. The structure fills out a range with start and end equaling the day that was clicked.
Check the Sample application for examples.

Kind Regards,
João Grazina 

Hi Grazina,

Yes after my post I have figure it out what I was doing wrong. I have already It working. I will check your sample to see how you fill the range.

Thanks.

Best Reggards,
Nuno Mendes