Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onDayShow not working as expected #3

Open
richgcook opened this issue Jul 24, 2014 · 1 comment
Open

onDayShow not working as expected #3

richgcook opened this issue Jul 24, 2014 · 1 comment

Comments

@richgcook
Copy link

onDayShow doesn't seem to work. I currently have this

onDayClick: function(e) {
    window.location.href = 'http://www.website.com/whats-on/day/' + e.data.date.GetCustomFormat();
},

which works well, but it ultimately means that any date you click on takes you to a page, whereas I only want this to happen when you click on a date with an event.

In the documentation, it looks like this is what onDayShow would work, but it simply does nothing. Any thoughts?

@richgcook
Copy link
Author

Perhaps something like this would work? Although this didn't...

onDayClick: function(e) {
                if ( $('.c-day').not('.have-events') ) {
                    $(this).on('click', function() {
                        return false;
                    });
                } else {
                    window.location.href = 'http://sdd2014.polimekanos.com/whats-on/day/' + e.data.date.GetCustomFormat();
                }
            },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant