[CLOSED] ext:CalendarPanel - How I configure slot times to my work schedules?

  1. #1

    [CLOSED] ext:CalendarPanel - How I configure slot times to my work schedules?

    Hi!

    CalendarPanel in day view starts in 12:00 am and end in 11:00pm. I wish change this intervalo to starts in 8am and end in 8pm...
    Last edited by Daniil; Mar 28, 2012 at 8:47 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Unfortunately, there is no such functionality in the current version of Calendar.

    In the near future we hope to present a new version of Calendar, there should be that functionality. Though, probably, it will require a separate license.
  3. #3
    Hi Daniil!

    There are any workarround to this?

    In another thread, you override a script to format time values in military time. In this same script, I can modified the loop to start in 8:00am. But, the events are renderer in uncorrect slot. There are with solve this?
    You think there are another errors and situations with this way?

    Position the scroll bar to 08:00am now also help, if nothing else can be done.
  4. #4
    Quote Originally Posted by supera View Post
    There are any workarround to this?

    In another thread, you override a script to format time values in military time. In this same script, I can modified the loop to start in 8:00am. But, the events are renderer in uncorrect slot. There are with solve this?
    You think there are another errors and situations with this way?
    Unfortunately, I spent about two hours to sort it out with no success.

    Quote Originally Posted by supera View Post
    Position the scroll bar to 08:00am now also help, if nothing else can be done.
    I think it's possible. I will look.
  5. #5
    Please try the following.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    
        <script type="text/javascript">
            Ext.calendar.view.DayBody.override({
                refresh: function() {
                    var top = this.el.getScroll().top;
                    this.prepareData();
                    this.renderTemplate();
                    this.renderItems();
                },
    
                afterRender: function() {
                    if (!this.tpl) {
                        this.tpl = new Ext.calendar.template.DayBody({
                            id: this.id,
                            dayCount: this.dayCount,
                            showTodayText: this.showTodayText,
                            todayText: this.todayText,
                            showTime: this.showTime
                        });
                    }
                    this.tpl.compile();
    
                    this.addCls('ext-cal-body-ct');
    
                    this.callParent(arguments);
                }
            });    
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Viewport runat="server" Layout="FitLayout">
            <Items>
                <ext:CalendarPanel runat="server">
                    <EventStore runat="server" />
                    <Listeners>
                        <ViewChange 
                            Handler="if (view instanceof Ext.calendar.view.Day) {
                                         view.el.child('.ext-cal-body-ct').dom.scrollTop = 8 * 42;
                                     }" 
                            Delay="1" />
                    </Listeners>
                </ext:CalendarPanel>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    If the screen-size is big, then it will be scrolled just to the bottom, so you may see a hour earlier than "08:00" at the top.
  6. #6
    Daniil

    It is splendid... it is exactly I needed.
    I am very grateful for your help ...

    Thanks a lot

Similar Threads

  1. [CLOSED] CalendarPanel: customizing the event slot.
    By supera in forum 2.x Premium Help
    Replies: 4
    Last Post: Apr 04, 2013, 5:40 AM
  2. Replies: 5
    Last Post: Jul 11, 2012, 2:02 PM
  3. Replies: 6
    Last Post: Apr 24, 2012, 12:20 PM
  4. Replies: 9
    Last Post: Apr 18, 2012, 3:09 PM
  5. Replies: 1
    Last Post: Apr 17, 2012, 9:19 PM

Tags for this Thread

Posting Permissions