Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unwanted string coming with all event title in fullcalendar

i am using fullcalendar and its working fine.i got the tutorial from http://www.codeproject.com/Articles/638674/Full-calendar-A-complete-web-diary-system-for-jQue

but here some unwanted string like "12a" is coming with all event title.i want to remove this unwanted name. i checked in both css and js file but i am unable to find where it is included.

anyone help me to remove this "12a" string from all event name.

like image 562
user3501613 Avatar asked Sep 09 '15 07:09

user3501613


People also ask

How do I delete a Fullcalendar event?

Event::remove Removes an event from the calendar. You must call this on an Event Object that you received elsewhere in the API, such as getEventById.

How do I set events in Fullcalendar?

Here is an example of how to specify an array of events: var calendar = new Calendar(calendarEl, { events: [ { title : 'event1', start : '2010-01-01' }, { title : 'event2', start : '2010-01-05', end : '2010-01-07' }, { title : 'event3', start : '2010-01-09T12:30:00', allDay : false // will make the time show } ] });

How do I create a dynamic event in Fullcalendar?

although it is not specified on the fullcalender site, it is necessary to assign a value to the "allday" parameter to be able to add new events dynamically. If you set this value to "false", it will not add the event to the AllDay row. If you do "true" it will add to the AllDay row. Save this answer.


2 Answers

To delete "12a", add displayEventTime: false.

$('#calendar').fullCalendar({
    events: [
        {
            title:  'My Event',
            start:  '2010-01-01T14:30:00',
            allDay: false
        }
        // other events here...
    ],
    timeFormat: 'H(:mm)' // uppercase H for 24-hour clock、
    displayEventTime: false,
});
like image 101
Yosuke Morita Avatar answered Oct 10 '22 00:10

Yosuke Morita


This "12a" represents the start time of your event, i.e. "12 am". You can change the formatting in the calendar options:

$('#calendar').fullCalendar({
    events: [
        {
            title:  'My Event',
            start:  '2010-01-01T14:30:00',
            allDay: false
        }
        // other events here...
    ],
    timeFormat: 'H(:mm)' // uppercase H for 24-hour clock
});

Source: http://fullcalendar.io/docs/text/timeFormat/

If you want to hide the start time from your event, simply add this to your CSS:

.fc-time{
   display : none;
}
like image 38
Slyvain Avatar answered Oct 10 '22 02:10

Slyvain