[CLOSED] [1.0] Calendar

  1. #1

    [CLOSED] [1.0] Calendar

    Hello,

    When I have the following calendar:

            <ext:CalendarPanel ID="Calendar" runat="server"
                Border="false"
                Title="Calendar">
                <EventStore ID="Events" runat="server"
                    AutoLoad="true">
                    <BaseParams>
                        <ext:Parameter AutoDataBind="true" Name="Id" Value='<%# Model.Id %>' />
                    </BaseParams>
                    <Proxy>
                        <ext:HttpProxy AutoDataBind="true" Url='<%# Url.Action("Search", "Event", new { Area = "Management" } ) %>' />
                    </Proxy>
                    <Reader>
                        <ext:JsonReader IDProperty="Id" Root="data">
                        
                        </ext:JsonReader>
                    </Reader>
                </EventStore>
            </ext:CalendarPanel>
    With the following data:
    {data:[{"Id":"eeeea18b-5e5a-4835-a064-000f650088e7","CalendarId":1,"Title":"Title","StartDate":"2011-05-10T00:00:00","EndDate":"2011-05-10T23:59:59"},{"Id":"83a2efb6-866a-4f6d-905e-0d5093f6f254","CalendarId":1,"Title":"Title","StartDate":"2011-05-30T00:00:00","EndDate":"2011-05-30T23:59:59"},{"Id":"535cdc4c-998d-4ce8-a30f-584210bd4be0","CalendarId":1,"Title":"Title","StartDate":"2011-05-25T00:00:00","EndDate":"2011-05-25T23:59:59"},{"Id":"ed3581d8-e920-411d-9e9b-8004d7407826","CalendarId":1,"Title":"Title","StartDate":"2011-05-15T00:00:00","EndDate":"2011-05-15T23:59:59"},{"Id":"7471d22f-284f-484c-a0f6-815b9b8caa29","CalendarId":1,"Title":"Title","StartDate":"2011-05-05T00:00:00","EndDate":"2011-05-05T23:59:59"},{"Id":"6df1ecd0-e604-4789-bca4-8495b7e9155e","CalendarId":1,"Title":"Title","StartDate":"2011-06-04T00:00:00","EndDate":"2011-06-04T23:59:59"},{"Id":"38815360-a6ed-4754-8b5f-cf2ce7c2dabb","CalendarId":1,"Title":"Title","StartDate":"2011-05-20T00:00:00","EndDate":"2011-05-20T23:59:59"}],total:7,success:true}
    When I hover over the event on the 5th, you'll notice all of the other events will change colour (slightly) except for the 15th and 30th? And vice-versa.

    Suggestions?

    Cheers,
    Timothy
    Last edited by Daniil; May 31, 2011 at 10:47 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Passing EventId field also should solve the problem.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Passing EventId field also should solve the problem.
    Hello Daniil,

    I tried adding the EventId to the output from my server, it didn't appear to change anything?

    Any other suggestions?

    Cheers
  4. #4
    Hmm, looks to be a problem with the calendar control.

    If you have two events on the same week the eventId will be "100-2" assuming your eventId in the store is "100". If you check the next week the value will be "100-3".

    Thoughts? Have there been any updates to the this control by the original developer?

    Cheers
  5. #5
    assuming your eventId in the store is "100"
    EventId must have int type. It's the restriction from the calendar's creators. I don't know why they did so.

    One more thing.
    <ext:JsonReader IDProperty="Id" Root="data">
    You define IDPropert="Id", but there is no standard field with "Id" name. So, "Id" from proxy doesn't make sense. Please add it to Field.
    <ext:JsonReader IDProperty="Id" Root="data">
        <Fields>
            <ext:RecordField Name="Id" />
        </Fields>
    </ext:JsonReader>
  6. #6
    Quote Originally Posted by Daniil View Post
    One more thing.
    <ext:JsonReader IDProperty="Id" Root="data">
    You define IDPropert="Id", but there is no standard field with "Id" name. So, "Id" from proxy doesn't make sense. Please add it to Field.
    <ext:JsonReader IDProperty="Id" Root="data">
        <Fields>
            <ext:RecordField Name="Id" />
        </Fields>
    </ext:JsonReader>
    It's wrong. IdProperty doesn't require RecordField with its name.

    But anyway, this "Id" field will not be used by Calendar.

    1. Use only standard fields like EventId, StartDate, etc. You can get another fields in Calendar's sources - EventRecord.js.

    or

    2. Use custom fields with respective mappings. The following example should clarify what I mean.
    http://forums.ext.net/showthread.php?13824

Similar Threads

  1. Replies: 0
    Last Post: Jan 13, 2012, 2:33 PM
  2. [CLOSED] Help with ext:Calendar
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 56
    Last Post: Jun 02, 2011, 4:05 PM
  3. Replies: 9
    Last Post: Apr 12, 2011, 3:13 PM
  4. [CLOSED] [1.0] How to: Calendar
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 22, 2011, 3:22 PM
  5. [CLOSED] [1.0] Calendar bug
    By x1000 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 19, 2010, 12:17 PM

Posting Permissions