FUll Calendar

35 views
Skip to first unread message

Mohammed Rashid

unread,
Sep 17, 2014, 8:19:27 AM9/17/14
to rubyonra...@googlegroups.com
I have successfully managed to display the Calendar on my Ruby page by
adding necessary callouts to the css and javascript files and have
successfully managed to display the calendar:

<script>
$(document).ready(function() {

$('#calendar').fullCalendar({



})

});

</script>
This works which is great.
now I am having difficulty trying to display an alert message which
should work by using:
<script>
$(document).ready(function() {

$('#calendar').fullCalendar({
dayCick: function() {
alert('a day has been clicked!');
}

})

});


</script>
but this function does not work and is the same as before. Can an expert
please help.

--
Posted via http://www.ruby-forum.com/.

Vivek Sampara

unread,
Sep 17, 2014, 8:35:56 AM9/17/14
to rubyonra...@googlegroups.com
I think there is a typo. You typed *dayCick:* It should be *dayClick* 


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/25d7a77bb0cc5702e15e920155c92a39%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Mohammed Rashid

unread,
Sep 17, 2014, 9:09:47 AM9/17/14
to rubyonra...@googlegroups.com
I changed the error, but i still got the same result. Do I need a
database linked to this calendar in order for it to work? the link that
you sent me seems very useful and what I am in search for, but I
eventually want to run a database system where users can click out dates
when they are not available

Evandro Santos

unread,
Sep 17, 2014, 9:09:47 AM9/17/14
to rubyonra...@googlegroups.com
Good morning sir Mohammed... correct if i'm wrong but you are using full calendar gem?
i think this this jQuery code can help

<script>
$('.cal').datepicker({
  onSelect: function() {
    alert('Something were selected');
  }
});
</script>

regards


On 17 September 2014 09:18, Mohammed Rashid <li...@ruby-forum.com> wrote:
fullCalendar


Mohammed Rashid

unread,
Sep 17, 2014, 12:29:14 PM9/17/14
to rubyonra...@googlegroups.com
HI Evandro, I have tried his and it still does not work, because i have
a rails app, I put:
<%= stylesheet_link_tag 'fullCalendar', media: 'all',
'data-turbolinks-track' => true %>
<%= javascript_include_tag 'fullcalendar', 'data-turbolinks-track' =>
true %>
<%= csrf_meta_tags %>

in the file itself for a call out? Is this the right way to do so ?
Reply all
Reply to author
Forward
0 new messages