Closed giopierini closed 9 years ago
You are missing something. How do you initialize these buttons?
I doen't have problems... :/
I think is the same of the example inside the packet...
var calendar = $('#calendar').calendar(options);
$('.btn-group button[data-calendar-nav]').each(function() {
var $this = $(this);
$this.click(function() {
calendar.navigate($this.data('calendar-nav'));
});
});
$('.btn-group button[data-calendar-view]').each(function() {
var $this = $(this);
$this.click(function() {
calendar.view($this.data('calendar-view'));
});
});
@giopierini can you simulate the same on jsfiddle.com to share the URL?
i solved! the problem was the button html tag, my calendar is inside a form, and when i click the button the form was submitted... i solved changing button with span, now it work fine...thank you anyway!
i solved changing button with span, now it work fine...thank you anyway!
Better just add attribute to button type="button"
and it will stop submitting the form. Because by default button type is submit.
Hi, i used your calendar in my custom CRM, but i have a problem when i click on the buttons on top for change month/year, go to the next etc etc. when every button is clicked, first works fine, i can see the calendar change, but after that the browser starts to reload a page. i don't know if there is conflict with some my script, but i use your same version of bootstrap (3) and jquery. i tried with preventdefault(). if i use it the window doesn't reload, but the calendar doesn't change...how i can stop the page realoading? Thanks!