Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: ExtJS 6.2 Calendar Sample Data

  1. #21
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    Oh, on another note - including code packages in Fiddle is either challenging or impossible.

    However....
    Fiddle 2 is soon to be a thing. And in Fiddle 2 we plan to support code packages including framework code packages like Calendar. There'll be some more interesting updates that should make complex examples easier to both share and inspect, too.

    Mitch is working hard on it currently and I've been testing it out. He's going to be doing a whole presentation on it at Senchacon, too. So, if you haven't signed up for Senchacon and were waiting for that one extra cool reason to show up - this might just be it!

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

    Default

    Thanks slemmon. I'm definitely seeing my calendar events now, in day/week/month views and all's well apart from that label bug which (thankfully) you've been able to reproduce. If you happen to come up with a quick workaround I might be able to implement before the next Ext JS release, I'd welcome it (or perhaps there's a different way to disable the edit form and handle the click event?)

    And as for SenchaCon, Las Vegas is a long, long, way from Australia and just a few days before that I'll have returned from London. Total flight time is about 24 hours each way for that, so I'll be a walking zombie by the time I return, alas. I look forward to seeing Fiddle 2 when it's ready.

  3. #23
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    @marc

    If only we were hosting in Las Vegas, Australia... if that is a thing...

    Look for lots of helpful goodies in Fiddle due out soon-ish, though. We'll have some write-ups / guides detailing the updates to go along with the release.

    Can you post to the Premium forums asking for a patch for the EXTJS-22779 issue you reported? Overrides pre-release are a Premium privilege so we'll want to communicate on that in the Premium channel. Just post the thread link back here once you've got it posted and we can pick up that conversation over there.

    Also, something I noticed from your example; if you're setting calendar panel listeners you have to do so currently on the view configs themselves. But, we're going to address that on an internal feature request for a future release. The calendar events should relay to the view.Multi and panel.Panel containers so you don't have to configure common calendar event listeners on each view.

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

    Default

    Thanks. Here's a link to the other thread.

    The closest thing Australia would have to Las Vegas might be the Gold Coast in south east Queensland I guess, but there's a tendency among some to add "-vegas" to the name of some places, such as "Brisvegas" for Brisbane and even "Tamvegas" for my own town. Bizarre, I know :-)

  5. #25
    Sencha User
    Join Date
    Oct 2016
    Posts
    0

    Default Pre-loaded single, not all day events not showing in day/week view of calendar-panel

    Hey, you guys may have already found a fix for this... I have found that the when I pass events through ajax that events defined for one day and at a specific time only show up on the month view of the calendar-panel xtype. Creating new events of the same kind shows up in all views. Is there a way to get pre-defined single, not all day events to show in the day and week views of the calendar panel?

    Here's my code. Event 2002 works in all views, but event 2001 doesn't.

    StaffCalendar.js

    Ext.define('Scheduling.view.grids.StaffCalendar', {
    extend: 'Ext.panel.Panel',
    xtype: 'calendar-panel',

    requires: [
    'Ext.calendar.panel.Panel'
    ],

    width: '95%',
    height: 700,

    layout: 'fit',
    items: [{
    xtype: 'calendar',
    style: {'padding-right':'5px'},
    views: {
    day: {
    startTime: 6,
    endTime: 22
    }
    },
    timezoneOffset: 0,
    store: {
    autoLoad: true,
    proxy: {
    type: 'ajax',
    url: 'resources/test.json',
    reader: {
    type: 'json',
    rootProperty: 'calendars',
    totalProperty: 'total'
    }
    },
    eventStoreDefaults: {
    proxy: {
    type: 'ajax',
    url: 'resources/events.json'
    }
    }
    }
    }]

    })

    test.json

    {
    "calendars":
    [{
    "id":1,
    "title": "Test",
    "color": "blue",
    "hidden": "false",
    "editable": "true",
    "eventStore": {
    "proxy": {
    "type": "ajax",
    "url": "resources/events.json"
    }
    }
    }]
    }

    events.json

    [
    {
    "id": 2001,
    "calendarId": 1,
    "startDate": "2016-10-05T21:30:00.000Z",
    "endDate": "2016-10-05T22:30:00.000Z",
    "color": "green",
    "title": "Meet with the design team",
    "description": "Carve out requirements for the new UI changes"
    },{
    "id": 2002,
    "calendarId": 1,
    "startDate": "2016-10-13T21:30:00.000Z",
    "endDate": "2016-10-15T22:30:00.000Z",
    "color": "red",
    "title": "Eat at Thai Ginger",
    "description": "Celebrating"
    }]

  6. #26
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    Thank you for the feedback.
    There is a ticket filed internally to review how best to display events occurring before, after, or across the start/end timespan of a day / week view.
    EXTJS-21190

    I've added your use case to the notes for additional detail.

  7. #27
    Sencha Premium User
    Join Date
    Feb 2015
    Posts
    25
    Answers
    2

    Default

    Thanks for the good read. It's gotten me much closer to getting the calendar working, but I seem to be having a problem w/ saving a new event to a calendar. I believe it has to do with the backend i'm using. I'm using an ExpressJS and MongoDB stack, and my calendar and event models use _id instead of id. I'm not sure if i have to create an explicit model for Calendar, extending Ext.calendar.model.Calendar and set idProperty: '_id' or not. Right now, when i attempt to save a new event i fail the following code:

    Code:
            getEventsForCalendar: function(calendar) {
                var ret = null;
    
    
                if (!calendar.isModel) {                                           // line 285 EventSource.js fails b/c calendar is null
                     calendar = this.calendarMap[calendar];
                }
    
    
                if (calendar) {
                    ret = calendar.events();
                }
                return ret;
            },
    I'm just not sure how to get around the fact that mongo is looking for _id and Sencha is looking to pass id. If I need to build an explicit model to override this, what fields need to be defined? Any thoughts?

    I believe the reason this is occurring is b/c i created a model and set the idProperty: '_id' w/o any other fields. Just not sure how to handle this.

    Also - there was mention that you would be working on more thorough documentation of the data side of the calendar widget/plugin. Has that happened? Does it exist?

    Thanks for any guidance you can provide.

Page 3 of 3 FirstFirst 123

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
  •