jquery - 24 hour time format (so no AM to PM) for fullCalendar -
jquery - 24 hour time format (so no AM to PM) for fullCalendar -
i'm trying display 24 hr time format in fullcalendar, i'm trying utilize these instructions: http://arshaw.com/fullcalendar/docs/text/timeformat/
so i've added
timeformat: { agenda: 'h(:mm)' //h:mm{ - h:mm}' },
to json.php :
$(document).ready(function() { $('#calendar').fullcalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaweek,agendaday' }, editable: true, alldaydefault: false, events: "core/displays/calendar/json-events.php", defaultview: 'agendaday', timeformat: { agenda: 'h(:mm)' //h:mm{ - h:mm}' }, eventdrop: function(event, delta) { alert(event.title + ' moved ' + delta + ' days\n' + '(should update database)'); }, eventclick: function(calevent, jsevent, view) { window.location = "details_view.php?id=" + calevent.id; }, loading: function(bool) { if (bool) $('#loading').show(); else $('#loading').hide(); } }); });
but didn't work, i've added fullcalendar.js
// time formats titleformat: { month: 'mmmm yyyy', week: "mmm d[ yyyy]{ '—'[ mmm] d yyyy}", day: 'dddd, mmm d, yyyy' }, columnformat: { month: 'ddd', week: 'ddd m/d', day: 'dddd m/d' }, axisformat: 'h(:mm)', //,'h(:mm)tt', timeformat: { agenda: 'h(:mm)' //h:mm{ - h:mm}' }, // locale
but didn't work either, doing wrong?
you wanna set layout 24hour scheme or events.
if wanna add together events set 22:00 'party' add together timeformat: 'h:mm' , json.php file
eventdrop: function(event, delta) { alert(event.title + ' moved ' + delta + ' days\n' + '(should update database)'); }, timeformat: 'h:mm' ,
if wanna alter layout of calendar go fullcalendar.js
look up
setdefaults
and alter code this.
setdefaults({ alldayslot: true, alldaytext: 'volledige dag', firsthour: 8, slotminutes: 30, defaulteventminutes: 120, axisformat: 'hh:mm', timeformat: { agenda: 'h:mm{ - h:mm}' }, dragopacity: { agenda: .5 }, mintime: 0, maxtime: 24
});
it works me,
jquery time fullcalendar
Comments
Post a Comment