Results 1 to 2 of 2

Thread: Calendar events not working on mobile

  1. #1

    Default Calendar events not working on mobile

    So I've finally managed to create a calendar with some dummy data to display it. But when I check the app in Chrome with the Devtools Device toolbar set to Pixel 2 for example, none of the events that are configured on the calendar fire or are captured in the controller.

    My view code:
    Code:
    
    Ext.define('Calendar.view.calendar.Calendar',{
        extend: 'Ext.Container',
        xtype: 'app-calendar',
     
        requires: [
            'Calendar.view.calendar.CalendarController',
            'Calendar.view.calendar.CalendarModel',
            'Calendar.store.Remote'
        ],
    
        controller: 'view-calendar',
        viewModel: {
            type: 'view-calendar'
        },
    
        config: {
            title: 'Calendar',
            buttons: ['add'],
            autoScroll: false
        },
    
        items:[
            {            
                xtype: 'calendar',
                width:'100%',
                height:'100%',
                reference: 'objCalendar',
                switcherPosition: 'sideBar',
                views: {
                    month: {
                        xtype: 'calendar-month',
                        reference: 'monthCalendar',
                        cls: 'month-view',
                        label: 'Month',
                        view: {
                            xtype: 'calendar-monthview',
                            reference: 'monthConfiguration',
                            cls: 'month-view',
                            addOnSelect: false,
                            firstDayOfWeek: 1,
                            listeners:{
                                select: 'onSelect',
                                selectrange: 'onSelectRange',
                                eventtap: 'onEventTap'
                            }
                        }
                    }
                },
                bind: {
                    store: '{calendars}'
                },
            }
        ]
    });
    
    
    And my controller the has the events:
    Code:
    Ext.define('Calendar.view.calendar.CalendarController', {    extend: 'Ext.app.ViewController',
        alias: 'controller.view-calendar',
    
        onSelect: function(me, context, e){
            Ext.Msg.alert('Hi there');
        },
    
        onSelectRange: function(me, context, e){
            Ext.Msg.alert('Hi there ranger');
        },
    
        onEventTap: function(me, context, e){
            debugger;
        },
    
    });

  2. #2

    Default

    It seems that the Weeks component of the Calendar has an onTouchStart event:

    Code:
    onTouchStart:function(e, t) {            
            var me = this,
                el = me.element,
                cell;
    
    
                if (e.pointerType === 'touch' || e.getTarget('.' + me.$overflowCls, el) ||
                    e.getTarget('.' + me.$overflowPopupCls, el)) {
                    return;
                }
    
                cell = me.getCellFromEvent(e);
    
                if (cell) {
                    me.isSelecting = true;
                    me.selectedStartIndex = me.selectedEndIndex = Ext.Array.indexOf(me.cells, cell);
                    Ext.fly(cell).addCls(me.$selectionCls);
                }
            }
    


    But why does it just ignore the 'touch' pointer type??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •