[CLOSED] CalendarPanel: date picker

  1. #1

    [CLOSED] CalendarPanel: date picker

    Hi!

    CalendarPanel is showing strange behavior.
    This behavior occurs in this example too.
    https://examples2.ext.net/#/Calendar/Overview/Basic/

    To reproduce, follow the steps:
    1 - Click in 'Day' button, in CalendarPanel toolbar, to change the viewMode to DayView.
    2 - Click in any date, in datepicker, in a week different of the current day. For example, may/08.
    3 - Click in 'Week' button, in CalendarPanel toolbar. The week showed is the week of current day, and not the week of may/08.

    I think that should be displayed week is the week of may/08 (may/6 to may/12)
    Last edited by Daniil; May 25, 2012 at 11:54 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Well, it's expected behavior for me, because the setStartDate sets up a start date for the current view only.

    Please look at the DatePicker listener how you could achieve your requirement.

    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>
    
        <script type="text/javascript">
            var onSelect = function (picker, date) {
                App.CalendarPanel1.setStartDate(date);
                App.CalendarPanel1.startDate = date;
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Viewport runat="server" Layout="BorderLayout">
                <Items>
                    <ext:Panel 
                        runat="server" 
                        Width="180" 
                        Region="West">
                        <Items>
                            <ext:DatePicker ID="DatePicker1" runat="server">
                                <Listeners>
                                    <Select Fn="onSelect" />
                                </Listeners>
                            </ext:DatePicker>
                        </Items>
                    </ext:Panel>
                    <ext:CalendarPanel ID="CalendarPanel1" runat="server" Region="Center">
                        <EventStore runat="server" />
                    </ext:CalendarPanel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
  3. #3
    Hi Daniil!

    Works very fine!

    Thanks a lot!

Similar Threads

  1. Replies: 3
    Last Post: May 09, 2012, 4:28 PM
  2. [CLOSED] Hiding a date picker
    By jeremyl in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 28, 2011, 10:16 AM
  3. [CLOSED] Date picker BUG
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Dec 08, 2010, 2:19 PM
  4. [CLOSED] Date Picker
    By Raynald_Fontaine in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 09, 2010, 8:35 PM
  5. Replies: 3
    Last Post: May 06, 2010, 12:48 PM

Tags for this Thread

Posting Permissions