Results 1 to 5 of 5

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

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    52
    Answers
    3
    Vote Rating
    0
      0  

    Default 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
      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
    52
    Answers
    3
    Vote Rating
    0
      0  

    Default

    ?
    not datepickerfield, datepicker xtype.

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
      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
    52
    Answers
    3
    Vote Rating
    0
      0  

    Default

    ?
    There's no model or form.

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
  •