0


Tell me please, how i can create two Ext.calendar object?

write this code, and he say
Ext.Error: Registering duplicate id "left-col" with this manager

    var lPanel = Ext.create('Ext.calendar.CalendarPanel', {
        id: 'app-calendar-left',
        region: 'west',
        width: '50%',
        minWidth: 300,
        eventStore: Ext.create('Ext.calendar.data.MemoryEventStore', {
            data: Ext.calendar.data.Events.getData()
        }),
        calendarStore: this.calendarStore,
        border: 1,
        activeItem: 3,
        monthViewCfg: {
            showHeader: true,
            showWeekLinks: true,
            showWeekNumbers: true
        }
    });

    var rPanel = Ext.create('Ext.calendar.CalendarPanel', {
        id: 'app-calendar-right',
        region: 'center',
        width: '50%',
        minWidth: 300,
        eventStore: Ext.create('Ext.calendar.data.MemoryEventStore', {
            data: Ext.calendar.data.Events.getData()
        }),
        calendarStore: this.calendarStore,
        border: 1,
        activeItem: 3,
        monthViewCfg: {
            showHeader: true,
            showWeekLinks: true,
            showWeekNumbers: true
        }
    });

    Ext.create('Ext.container.Viewport', {
        layout: 'border',
        items: [lPanel, cPanel]
    });

Help somebody, i not know what doing with this error

Judzhin Miles
  • 71
  • 3
  • 5

1 Answers1

0

The issue may be caused by giving the 'width' attribute in a border layout in the 'center' region, try removing that. Also, I don't believe minWidth makes sense on the 'center' region of a border layout, remove that too. The 'west' region should have width defined in pixels in the border layout.

Reimius
  • 5,694
  • 5
  • 24
  • 42
  • I have updated my answer, I think your problem may be related to how you have nested things in the border layout. – Reimius Jan 16 '13 at 19:38