Results 1 to 5 of 5

Thread: [FIXED] Is it possible to have a date picker inline in a panel ?

  1. #1
    Sencha User
    Join Date
    Jun 2008
    Posts
    75

    Default [FIXED] Is it possible to have a date picker inline in a panel ?

    Hello everyone,


    I'm trying to reproduce that kind of screen :
    screenshot.jpg

    So, I'm trying to extend the Ext.picker.Date to remove the popup thing, and add the picker directly in a panel, but I didn't succeed for the moment..

    Could someone help me out with some advice because I can't manage to extend picker.Date and remove the mask.

    Should I extend the DatePickerField instead ?

    I don't really know where to look...

    Thanks,
    Pou.
    Last edited by pouniok; 1 Sep 2015 at 1:41 AM. Reason: fixed

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Location
    Kyiv, Montreal
    Posts
    124

    Default

    Ok, so I've just tried many ways, but seems there is only one that actually works:

    PHP Code:
    Ext.create('Ext.picker.Date', {
      
    floatingClsfalse// the only way to remove floating behavior, because floating: false does nothing.
      
    modalfalse // removes mask
    }); 

    Hope this helps!

    --
    https://tips.60devs.com/pay/github/milworm

  3. #3
    Sencha User
    Join Date
    Jun 2008
    Posts
    75

    Default

    Thank you that's a good start, but even with that config, it's not acting like a normal component.

    If I add it as the 3rd item of my container, it'll always appear as the first item on the screen.

    I'll try to look deeper if I can find something

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Kyiv, Montreal
    Posts
    124

    Default

    Here you go:
    PHP Code:
    Ext.create("Ext.Container", {
      
    items: [{
        
    xtype"button",
        
    text"Button1"
      
    }, {
        
    xtype"button",
        
    text"Button1"
      
    }, {
        
    xtype"datepicker"
        
    // removing floating-behavior.
        
    topnull
        
    rightnull
        
    bottomnull,
        
    leftnull,
        
    // removing mask
        
    modalfalse
      
    }],
      
    renderTodocument.body
    }) 

  5. #5
    Sencha User
    Join Date
    Jun 2008
    Posts
    75

    Default

    Thank you so much, it works perfectly !

    Here is the exact code I used :
    PHP Code:
    Ext.create('Ext.picker.Date', {     
        
    topnull,      
        
    rightnull,      
        
    bottomnull,     
        
    leftnull,     
        
    height200,    
        
    doneButtonfalse,    
        
    cancelButtonfalse,   
        
    toolbarfalse,    
        
    floatingClsfalse,    
        
    modalfalse,    
        
    yearFrom2000,    
        
    yearTo: (new Date().getFullYear() + 3),    
        
    listeners: {        
            
    scopeme,        
            
    pick: function(fvalslotopts) {            rec.set('value'val);        },       
            
    painted: function(){
                
    // I don't know why but the "value" config doesn't work here, I have to wait it's painted to initialize the value (don't work in the initialize event either)            
               
    var val Ext.isDate(rec.get('value')) ? rec.get('value') : new Date();            
               
    field.setValue(val);        
            }    
        }
    }) 
    And the result :
    picker.PNG

    Thank's again

    Pou.

Similar Threads

  1. Replies: 1
    Last Post: 4 Dec 2014, 7:18 AM
  2. Replies: 1
    Last Post: 12 Aug 2014, 7:53 AM
  3. Replies: 0
    Last Post: 22 Apr 2013, 11:41 PM
  4. Ext.PDate [4] (Extjs persian date) with date picker and date field
    By vahid4134 in forum Ext:User Extensions and Plugins
    Replies: 38
    Last Post: 9 Mar 2013, 3:18 AM
  5. Form Panel Date Picker not populating in Google Chrome
    By scdavidso in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 15 Aug 2010, 5:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •