开发者

How to show all text on the axis for each minute slots rather than just 6am, 7am etc

I've got:

axisFormat: 'h(:mm)tt',

slotMinutes: 45,

and on the left hand side, my time shows:

12am [blank] [blank] [blank] [blank] 3am

or if the default was left on for slotMinutes, it would show: 12am [blank] - but this would really be 12:30 1am and so on.

Is there any way I can show the blanked times? so: 12am 12:45

or 12am 12:30 1am 1:30 etc?

EDIT

apologies, shouldave posted this before. Basically, its FullCalendar from: the fullcalendar doc site

The code I have so far is:

<script type='text/javascript'>

    $(document).ready(function() {

        $('#calendar').fullCalendar({
            defaultView: 'agendaWeek',
            selectable: true,
            selectHelper: true,
            firstDay:1,
            allDaySlot:false,// this decides if the all day slot should be showed at the top
            axisFormat: 'h(:mm)tt',
            slotMinutes: 45,
   开发者_如何学运维         defaultEventMinutes:45,
            select: function(start, end, allDay) {
                var title = prompt('Event Title:');
                if (title) {
                    calendar.fullCalendar('renderEvent',
                        {
                            title: title,
                            start: start,
                            end: end,
                            allDay: allDay
                        },
                        true // make the event "stick"
                    );
                }
                calendar.fullCalendar('unselect');
            },
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },
            editable: true,
            theme: true,
            events: "json-events.php",

            eventClick: function(event,delta) {
            alert(event.id + event.title + ' was moved ' + delta + ' days\n' +
                '(should probably update your database)');
            if (event.url) {
                $.fancybox({
                        'transitionIn': 'none',
                    'transitionOut': 'none',
                    'type': 'ajax',
                    'href': event.url
                }); }},



            eventDrop: function(event, delta) {
                alert(event.id + event.title + ' was moved ' + delta + ' days\n' +
                '(should probably update your database)');
            },
            removeEvent: function(event, delta) {
                $('#calendar').fullCalendar('removeEvents', id);
            },

            updateEvent: function(event, delta) {
                var event = $('#calendar').fullCalendar('clientEvents', id);
                event.title = title;
                $('#calendar').fullCalendar('updateEvent', event);
            },


            loading: function(bool) {
                if (bool) $('#loading').show();
                else $('#loading').hide();
            }

        });

    });

Basically, it looks like: http://arshaw.com/js/fullcalendar-1.5.1/demos/selectable.html

If you then click on the Week (top right). See how its listed as 6am, blank, 7am, blank. Im trying to make no blanks, so 6am, 6:30am, 7am etc.

EDIT 2.. Done some debugging, and the field that controls the time on the left is slotMinutes, some values work, some fail:

slotMinutes: 5 WORKS
slotMinutes: 10 WORKS
slotMinutes: 15 FAILS
slotMinutes: 20 WORKS
slotMinutes: 25 WORKS
slotMinutes: 30 FAILS
slotMinutes: 35 WORKS
slotMinutes: 40 WORKS
slotMinutes: 45 FAILS
slotMinutes: 50 WORKS
slotMinutes: 55 WORKS
slotMinutes: 60 WORKS

Any ideas??

Thanks

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜