1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    48
    Vote Rating
    0
    Answers
    3
    celwell is on a distinguished road

      0  

    Default Unanswered: Listener on datepicker doesn't work, neither does value setting

    Unanswered: Listener on datepicker doesn't work, neither does value setting


    Hey, The painted event fires fine, but the deactivate event doesn't fire or something. Also the value default setting as today's date doesn't do anything. It doesn't do anything either if I pass a static object of the month year and day. Thanks for any help.

    Code:
    timeline =
          xtype: 'container'
          layout: 'fit'
          docked: 'top'
          height: 90
          margin: '0 0 5 0'
          items: [
            {
              xtype: 'datepicker'
              ui: 'light'
              baseCls: 'timeline-picker'
              modal: false
              border: '0'
              doneButton: false
              cancelButton: false
              toolbar: false
              height: 90
              style: 'background-image: none !important; background-color: none !important'
              value: new Date()
              yearFrom: 1950
              yearTo: 2025
              oldSort: 'top'
              listeners:
                painted: ->
                  @oldSort = Ext.getStore('Events').getModel().getProxy().getExtraParams().sort
                  Ext.getStore('Events').getModel().getProxy().getExtraParams().sort = 'custom_range'
                  Ext.getStore('Events').getModel().getProxy().getExtraParams().searchTerm = ''
                  Ext.getStore('Events').removeAll()
                deactivate: ->
                  alert 'deact'
                  Ext.getStore('Events').getModel().getProxy().getExtraParams().sort = @oldSort
                  Ext.getStore('Events').removeAll()
                  Ext.getStore('Events').loadPage(1)
            }
          ]
        timelineTab = Ext.create 'Ext.Container',
          layout: 'fit'
          baseCls: 'search-container'
          iconCls: 'sign_leftright'
          iconMask: true
          title: 'Timeline'
          items: [
            timeline
            eventsList
          ]

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    douglasknudsen is on a distinguished road

      0  

    Default


    this says its fixed
    http://www.sencha.com/forum/showthre...g-MVC&p=811528
    but I'm not seeing it either.

    Example here works though, grrr
    http://docs.sencha.com/touch/2-0/#!/...eld.DatePicker

    for yearFrom settings and the like, set those on the picker object:

    Code:
    xtype: 'datepickerfield',
                                    label: 'Entry Date',
                                    name: 'dateLogged',
                                    picker: {
                                        value: new Date(),
                                        yearFrom: 2010
                                    },

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    48
    Vote Rating
    0
    Answers
    3
    celwell is on a distinguished road

      0  

    Default


    ?
    not datepickerfield, datepicker xtype.

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    douglasknudsen is on a distinguished road

      0  

    Default


    oops! I overlooked that, but I did figure out the default value issue.....duh, the model sent to the form was overriding things.

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    48
    Vote Rating
    0
    Answers
    3
    celwell is on a distinguished road

      0  

    Default


    ?
    There's no model or form.

Thread Participants: 1

Tags for this Thread