Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: ExtJS 6.2 Calendar Sample Data

  1. #1
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default ExtJS 6.2 Calendar Sample Data

    Hi, Congrats to Sencha on the ExtJS 6.2 release.

    I am trying to create a calendar based on the example found in kitchensink.

    Code:
    Ext.define('myCalendar', {
        extend:'Ext.panel.Panel',   
       xtype:'calendar-panel',    
       requires:['Ext.calendar.panel.Panel'],    
    
       width:1200,    
       height:600,    
       layout:'fit',
        
       items:[{
            xtype:'calendar',
            views:{
    
                day:{
                    startTime:6,
                    endTime:22
                },
    
                workweek:{
                    xtype:'calendar-week',
                    controlStoreRange:false,
                    titleTpl:'{start:date("j M")} - {end:date("j M")}',
                    label:'Work Week',
                    weight:15,
                    dayHeaderFormat:'D d',
                    firstDayOfWeek:1,
                    visibleDays:5
               }
           },
    
            timezoneOffset:0, 
           store:{
                autoLoad:true, 
               proxy:{
                    type:'ajax',
                    url:'/KitchenSink/CalendarFull'
               }
           }
        }]
    })
    
    I understand that url: '/KitchenSink/CalendarFull'
    is the url to get the data for the store.

    Is there any way for me to get the sample data for calendar store?
    Or
    show me how to define a calendar store with some mocked data.

    Many thanks and any help is appreciated.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Have a look at the kitchensink/samples/data/calendar/Full.js file. The data is created there around line 174.

  3. #3
    Sencha User
    Join Date
    Feb 2016
    Posts
    0

    Default

    @GarySchlosberg there is no Full.js file.Can someone give an example of store definition without proxy data to be used by Calendar Panel.

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    That file should exist. Relative to the ext-6.2.0 directory, it is at examples/kitchensink/samples/data/calendar/Full.js. Perhaps download a fresh copy of the framework?

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    462
    Answers
    65

    Default

    There's a bit more information in the new calendar guide as well. Specifically, this bit.

    The data that Gary referenced from Full.js looks like this if you haven't found it:

    Code:
    data: [{
        id: 1,
        title: 'Work Calendar',
        eventStore: {
            proxy: {
                type: 'ajax',
                url: '/KitchenSink/CalendarFullEvents/1'
            }
        }
    }, {
        id: 2,
        title: 'Personal',
        eventStore: {
            proxy: {
                type: 'ajax',
                url: '/KitchenSink/CalendarFullEvents/2'
            }
        }
    }, {
        id: 3,
        title: 'Project Zeus',
        eventStore: {
            proxy: {
                type: 'ajax',
                url: '/KitchenSink/CalendarFullEvents/3'
            }
        }
    }]
    Thanks!
    Greg

  6. #6
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,307
    Answers
    13

    Default

    I'm trying to make sense of the new Calendar component and I must say that I find the docs leave a bit too much to the imagination for my liking, and the sample code isn't too useful since it's faking the server-side response (so I can't even use dev tools myself to spy on what's going on to see how I can emulate the responses in my own web service).

    I tried binding my calendar to an existing store (which is already bound to a grid, and has StartDate and EndDate fields), and it's failing on line 470 of calendar/view/base.js: "store.getEventSource is not a function". So obviously there needs to be more done for a calendar store but I can't see that from reading the docs.

    Is there an explicit example of a store config for a calendar somewhere?

  7. #7
    Sencha User
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    462
    Answers
    65

    Default

    marc.fearby,

    We totally agree. In fact, Seth is currently working specifically on fleshing out the calendar guide to be more of a walkthrough with an emphasis on data. I'll let him know about this thread and see if he can provide you with some early access to the the data structures he's been studying.

    Thanks!
    Greg

  8. #8
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,307
    Answers
    13

    Default

    Thanks Greg. I'm making progress, albeit very slowly. I've created a new Ext.calendar.store.Calendars and I'm getting a different error this time: "calendar.events is not a function" so I'm getting somewhere.... hopefully in the right direction. I'll keep reading the docs.

  9. #9
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,307
    Answers
    13

    Default

    I'm going to have to shelve this and move onto something else for now because I'm getting absolutely nowhere trying to get this thing to show some data, which is rather disappointing because the calendar was the only reason I upgraded to Premium.

    I eagerly anticipate Seth's new guide.

  10. #10
    Sencha User
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    462
    Answers
    65

    Default

    I believe he's going to reach out to you soon to try and help prior to the guide being published. Hang in there! We'll get you squared away as soon as possible.

    Thanks for your patience!
    Greg

Page 1 of 3 123 LastLast

Similar Threads

  1. extjs calendar with dynamic data loading
    By javapurna in forum Ext: Q&A
    Replies: 3
    Last Post: 3 Mar 2015, 12:45 AM
  2. Cannot see Ext JS Calendar Sample
    By tzalberto in forum Ext 5: Q&A
    Replies: 9
    Last Post: 28 Oct 2014, 10:03 AM
  3. EXTJS calendar replaced by Jquery calendar
    By businessman332211 in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 11 Feb 2013, 12:37 AM
  4. Ext JS Calendar sample does not work at sencha site
    By jesus.ibanez in forum Ext: Q&A
    Replies: 1
    Last Post: 31 Oct 2012, 9:05 PM
  5. Sample code to show quicktip on mouseover event on Ext JS calendar Selected Days
    By manjush.kochi in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 23 Jun 2011, 8:30 PM

Tags for this Thread

Posting Permissions

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