Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    19
    Answers
    1
    Vote Rating
    1
    chris_np is on a distinguished road

      0  

    Default Unanswered: How to stop the hide event

    Unanswered: How to stop the hide event


    Hi there.

    I'm using an Ext.picker.Date and I have some checks I run on the hide event. However, if a certain criteria is met, I want to stop the process and have the date picker not hide.

    I've tried using the beforehide event, and running my code there, but that event doesn't seem to fire.

    Below is the config for my datepicker. If the condition is true, how can I stop the picker from hiding?

    Thanks for any help.

    Code:
    var datePicker = new Ext.picker.Date({
                docked: "bottom",
                listeners: {
                    beforehide: function() {
                        console.log("before hide");
                    },
                    hide: function() {
                        if (1 == 1) {
                            //how do I stop the picker from hiding?
                            Ext.Msg.alert("You cannot select that date.");                        
                        }
    
                    }
                },
                slotOrder: ["day", "month", "year"],
                useTitles: false
            });
            this.add(datePicker);

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Answers
    124
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    HI!

    as i guess, there is no any beforehide event for datepicker.

    so, you may try following to work upon your conditions.

    Code:
    function checkPickerCondition(){
    // check your conditions here and try to show hide    
          if (1==1){
            datePicker.hide();
        }
    }
    
    
    var datePicker = new Ext.picker.Date({
                docked: "bottom",            
                slotOrder: ["day", "month", "year"],
                useTitles: false
            });
    this..add(datePicker);
    checkPickerCondition();
    if above doesn't suits you, may you provide your conditions on which you want to hide or show your picker, so we may provide you a better solution.
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    19
    Answers
    1
    Vote Rating
    1
    chris_np is on a distinguished road

      0  

    Default


    Thanks for your reply.

    On what picker event would I fire the checkPickerCondition function?

    At present I want to prevent the hiding of the picker if they don't select a date from a specific range. If they select the wrong date I want a message alert, and the picker to stay visible to they can choose again.

    From what I can tell, the change event on the picker will only fire when the user clicks "Done", in which case the picker hides...

Thread Participants: 1

Tags for this Thread