[CLOSED] [2.1] Ext:Calendar, Disable Drag & Drop

  1. #1

    [CLOSED] [2.1] Ext:Calendar, Disable Drag & Drop

    Hello, I want to make a special form in which a calendar will show the current events in the database, but it won't be possible to modify them.

    I'm trying to avoid mouse events like Drag to select a date range etc, because I want it ReadOnly. Is there any way to accomplish this?
    Last edited by Daniil; Jul 16, 2013 at 6:56 AM. Reason: [CLOSED]
  2. #2
    Hi @FVNoel,

    Please follow this thread.
    http://forums.ext.net/showthread.php?18493
  3. #3
    Hello, I tried the following solution:

            var onDayRender = function (view) {
                if (view.body) {
                    view.body.dragZone.beforeDragEnter = function () {
                        return false;
                    }
                }
            }
                                            <DayView ID="DayView1" runat="server"
                                                TodayText="Hoy" ShowTodayText="true">
                                                <Listeners>
                                                    <Render Fn="onDayRender" Delay="1" />
                                                </Listeners>
                                            </DayView>
    But it doesn't seem to work.

    Tested it, and it's reaching the "return false;" line, however, that doesn't seem to change anything.
  4. #4
    Ok, managed to get it work with this modification of your example code:

            var onDayRender = function (view) {
                if (view.body) {
                    view.body.dragZone.startDrag = function (x, y) {
    
    
                        Ext.fly(this.getDragEl()).hide();
                        this.moveOnly = true;
    
    
                    }
                }
    
    
                if (view.body) {
                    view.body.dragZone.onEndDrag = Ext.Function.createInterceptor(function () {
                        this.moveOnly = false;
                    });
                }
            };
    Thank you!

Similar Threads

  1. [CLOSED] Disable drag and drop this last column.
    By majunior in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 31, 2011, 5:10 PM
  2. [CLOSED] How to disable drag drop
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Jan 24, 2011, 12:48 PM
  3. Drag'n Drop
    By Yannis in forum 1.x Help
    Replies: 1
    Last Post: Oct 28, 2009, 6:14 PM
  4. Drag Drop
    By designworxz in forum 1.x Help
    Replies: 0
    Last Post: Feb 19, 2009, 11:46 PM
  5. [CLOSED] MultiSelect with drag and drop, Drop listener
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 30, 2009, 8:25 AM

Posting Permissions