Hybrid View

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    34
    Vote Rating
    0
    anoopmishra is on a distinguished road

      0  

    Default Unanswered: Date picker parent

    Unanswered: Date picker parent


    How can i set the parent to a specified element?
    I have a container(main) which is a hbox.It has two containers(con1 and con2) with flex 1 and 4. I have the date picker field in con2 but the picker slides down from main container.
    I want it to slide up from con2.
    How can i do it?

  2. #2
    Sencha User
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    50
    Vote Rating
    1
    Answers
    6
    eastlander is on a distinguished road

      0  

    Default


    picker.showBy(con2);

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    34
    Vote Rating
    0
    anoopmishra is on a distinguished road

      0  

    Default


    I am calling the picker by a datepickerfield.
    How do i call the showBy method?
    Can u plz explain with an example.
    here's my code:
    xtype: 'datepickerfield',
    name:'enddate',
    readOnly:true,
    id:'enddate',
    label: 'Day',
    labelWidth: '35%',
    picker:{
    id:'daypicker',
    yearTo:2020,
    yearFrom:2010
    },

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    50
    Vote Rating
    1
    Answers
    6
    eastlander is on a distinguished road

      0  

    Default


    Sorry, I misunderstood your question.
    Have you tried renderTo? http://docs.sencha.com/touch/2-1/#!/...r-cfg-renderTo

  5. #5
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    34
    Vote Rating
    0
    anoopmishra is on a distinguished road

      0  

    Default


    I tried that but then the picker didn't appeared.
    I tried renderTo in datepickerfield and also in piicker. Nothing worked for me.
    I might be wrong with the syntax. Can u plz help me out with the syntax.
    I want the picker to appear in the container with id- feature,so I wrote
    Code: rendeerTo:Ext.get('feature'),
    Is this the correct way?

  6. #6
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Vote Rating
    20
    Answers
    64
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    stretchY:true
    I write English by translator.

  7. #7
    Sencha User
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    50
    Vote Rating
    1
    Answers
    6
    eastlander is on a distinguished road

      0  

    Default


    When feature is your id, it should be renderTo: Ext.Viewport.down('#feauture')

    But I justed tested this and it doesn't make any difference.
    I guess a picker is never displayed inside a container but always on top level.

Thread Participants: 2