You found a bug! We've classified it as TOUCH-3289 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member IAmCoder's Avatar
    Join Date
    Mar 2012
    Posts
    33
    Vote Rating
    1
    IAmCoder is on a distinguished road

      0  

    Default DatePicker won't select the last item in a list

    DatePicker won't select the last item in a list


    REQUIRED INFORMATION

    Touch version tested:
    • Sencha Touch 2.0.2
    Browser versions tested against:
    • Chrome 21.0.1180.79
    DOCTYPE tested against:
    • <!DOCTYPE HTML>
    Description:
    • The last item in a DatePicker list (month, day or year) can't be selected. It reverts to the second last item in the list.
    Steps to reproduce the problem:
    • Create an Ext.field.DatePicker (in an Ext.form.FieldSet in an Ext.form.Panel in an Ext.navigation.View in an Ext.Container in an Ext.tab.Panel). Run it and manually select the last year (2012).
    The result that was expected:
    • The year 2012 is selected.
    The result that occurs instead:
    • The year 2011 is selected.
    Operating System:
    • Windows 7

    test case:

    Code:
    Ext.Viewport.add(
        new Ext.picker.Date()
    );
    Last edited by mitchellsimoens; 20 Aug 2012 at 6:57 AM. Reason: added test case

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,532
    Vote Rating
    871
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thank you for the report.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Is this only on Chrome or also on device?

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha Premium Member IAmCoder's Avatar
    Join Date
    Mar 2012
    Posts
    33
    Vote Rating
    1
    IAmCoder is on a distinguished road

      0  

    Default


    This is only in chrome.

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Location
    Denver, CO
    Posts
    10
    Vote Rating
    0
    skitchpatterson3 is on a distinguished road

      0  

    Default Same problem here...

    Same problem here...


    Didn't see this was its own post; I just replied to a closed post regarding a similar issue.

    I am getting a strange misalignment problem when I use a datepicker in my form. I pull it in using xtype (code shown below attached picture). Perhaps this is a weird bug caused by Chrome v.21.0.1180.83 m ? I know of the text truncation issues (ellipses) that happen when using this latest version of Chrome, and so maybe this is another UI issue?

    datepickermisaligned.png

    Here's the behavior: If I move any column from its default value (default for value coded as "value: new Date()"), after the animation ends, the selection snaps back to some misaligned position, depending on the selection made. For example, if I select "January 1, 1980" (first/default minimum date), then there is no post-selection movement. However, if I select "December 31, 2012" (attempted in screenshot above), the datepicker moves the selection after animation end to November 29, 2011. If I click "done", the value loaded is 11/29/2011.

    It seems the post-selection movement amount of pixels or whatever depends on how far away the date is from the earliest available date. Hopefully that bit of info will help with the debugging.

    As stated above, but I'm testing on Windows Server 2008, Chrome desktop v. 21.0.1180.83 m (latest version to date, July 2012).

    Below is my code - nothing fancy by any means.
    Code:
    Ext.define('myApp.view.IncidentForm', {
        extend: 'Ext.form.Panel',
        xtype: 'incidentform',
        
        requires: [
            'Ext.form.Panel',
            'Ext.field.DatePicker',
            'Ext.field.Select',
            'Ext.field.Toggle'
        ],
        
        config: {
            title: 'Incident',
            id: 'incidentForm',
            
            items: [
                {
                    html: '<h4>Report an Incident</h4>'
                },
                {
                    xtype: 'fieldset',
                    title: 'Basic Info',
                    instructions: 'All fields are required.',
                    items: [
                        {
                            xtype: 'datepickerfield',
                            name: 'date',
                            label: 'Date',
                            value: new Date()
                        },
                        {
                            xtype: 'textfield',
                            name: 'time',
                            label: 'Time (hh:mm)'
                        },
                        {
                            xtype: 'selectfield',
                            name: 'eventType',
                            label: 'Event Type',
                            options: [
                                {text: 'Option 1'},
                                {text: 'Option 2'},
                                {text: 'Option 3'},
                                {text: 'Option 4'}
                            ]
                        }
                    ]
                },
            ]
        }
    });

  6. #6
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Sydney, Australua
    Posts
    73
    Vote Rating
    9
    btek will become famous soon enough

      0  

    Default


    We are getting this in chrome as well.

  7. #7
    Sencha User
    Join Date
    Jul 2012
    Location
    Denver, CO
    Posts
    10
    Vote Rating
    0
    skitchpatterson3 is on a distinguished road

      0  

    Default ST 1.1.1 works though...

    ST 1.1.1 works though...


    In my screenshot above, I am using ST 2.0.1.1. We have a previous version of our app built with ST 1.1.1 which does not have the same misalignment issue.

  8. #8
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,083
    Vote Rating
    44
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      0  

    Default


    it does this on the 'rank' field in the kitchen sink example, only chrome for me.
    Teahouse Training Company
    Official Certified Sencha Trainer

    Australia / New Zealand / Singapore / Hong Kong & APAC



    SenchaWorld.com - Sencha webinars, videos, etc
    SenchaForge.org - (coming soon)
    TeahouseHQ.com - Sencha ecosystem training portal

    Code Validation : JSLint | JSONLint | JSONPLint

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Posts
    416
    Vote Rating
    18
    jweber will become famous soon enough

      0  

    Default


    This is happening for me in 2.1rc2 too, in Chrome.

  10. #10
    Sencha User
    Join Date
    Feb 2012
    Posts
    67
    Vote Rating
    1
    Soenhay is on a distinguished road

      0  

    Default Same Issue

    Same Issue


    Hi,

    We are having the same issue of not being able to select the last item in a date picker with Chrome, Android, and iPhone.

    Also, we are having the same issue as skitchpatterson3 stated above. Some additional notes on that part:
    -The alignment issue does not happen when picking a month.
    -Picking a day or year causes the alignment issue.
    -Picking a month after the alignment is messed up will fix the alignment of the day but not the year.