Good afternoon, I know that this topic has been discussed on previous ocassions, nevertheless despite the different threads I still can't solve my problem. I am using the full calendar provided at http://arshaw.com/fullcalendar/, and they have two ways of displaying time, "10:30a"-"7p", for example. I want the time displayed on the calendar of events that are not full day, in a format "12:00 pm" or "12:00 am". The problem i'm having is, when you download the fullcalendar you have several files:
fullcalendar.js, fullcalendar.css, fullcalendar.min.js, fullcalendar.print.css, gcal.js, jquery-1.9.1.min, jquery-ui-1.10.2.custom.min
I tried what other threads suggest, which is a change in the fullcalendar.js at the time format and setdefault methods but to no avail. I can even delete the file "fullcalendar.js" and my test still works just fine. I want to know why is this and if the time format is not managed there, where is it managed? Thanks
Calendar::getDate Returns a Date for the current date of the calendar. For month view, it will always be some time between the first and last day of the month.
The calendar's dates can change any time the user does the following: click the prev/next buttons, change the view, click a navlink. The dates can also change when the current-date is manipulated via the API, such as when gotoDate is called. datesSet is called after the new date range has been rendered.
We can get start date by getView event with intervalStart. We can get end date by getView event with intervalEnd. var month = $('#calendar'). fullCalendar('getView').
FullCalendar is a JavaScript library that seamlessly integrates with such popular JavaScript frameworks as Vue, React, Angular. Thanks to its excellent documentation, one won't have trouble incorporating the library into projects.
Use this and it's going to work:
$('#calendar').fullCalendar({
timeFormat: 'hh:mm a'
});
If you are using timelineDay view, I found out that this setting will change the time format:
slotLabelFormat:"HH:mm"
You can use this:
axisFormat: 'h:mm a'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With