Results 1 to 9 of 9

Thread: DatePicker show wrong date in Android

  1. #1
    Sencha User
    Join Date
    Jul 2015
    Posts
    8

    Default DatePicker show wrong date in Android

    HI,

    My APP has a datepicker. It works well in iOS but shows wrong date in real Android device. You can reproduce the issue by below steps:

    - Choose March 31
    - Click April to change month
    - We are able to choose April 31
    - But after we click select, the selected date will go back to 31 March.

    The source code is as below:

    Ext.application({
    name: "Demo",
    icon: "icon.png",
    glossOnIcon: false,
    tabletStartupScreen: "tablet_startup.png",
    phoneStartupScreen: "phone_startup.png",

    requires: [
    'Ext.picker.Picker',
    'Ext.picker.Date',
    'Ext.Button',
    'Ext.Panel'
    ],

    launch: function() {
    this.picker = Ext.Viewport.add({
    xtype: 'datepicker',
    useTitles: false,
    doneButton: false,
    cancelButton: false,
    hidden: true,
    });

    // Add one button into the viewport and center it horizontally and vertically.
    Ext.Viewport.add({
    xtype: 'container',
    layout: {
    type: 'vbox',
    align: 'center',
    pack: 'center'
    },
    items: [
    {
    xtype: 'button',
    ui: 'normal',
    text: 'Show Picker',
    scope: this,
    handler: function() {
    // When you tap this button, show the picker.
    this.picker.show();
    }
    }
    ]
    });
    }
    });


    The Sencha Touch version is 2.4.2

    Hope to hear from you guys soon.
    Thanks
    Attached Images Attached Images
    Last edited by Andy su; 28 Sep 2015 at 6:08 PM. Reason: to add screenshots

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Where are your select button and its logic? Please modify the following fiddle so that it illustrates the issue you are experiencing. https://fiddle.sencha.com/#fiddle/v3s
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha User
    Join Date
    Jul 2015
    Posts
    8

    Default

    If you test it in IE alone, you can not see any problems. But if you debug it in ADT environment (select Samgsung or LG device), you can see the problems. But for Nexus device, it is OK too.

  4. #4
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    In what version of Android are you experiencing this issue?

  5. #5
    Sencha User
    Join Date
    Jul 2015
    Posts
    8

    Default

    I debug it in Android 5.0 and Android 5.1. And I found this issue in Android 4.4 too.

  6. #6
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    I'm unable to reproduce this issue on a Galaxy S4 running Android 5.0.1. Can you reproduce it with this test case? https://fiddle.sencha.com/#fiddle/v3s

  7. #7
    Sencha User
    Join Date
    Jul 2015
    Posts
    8

    Default

    I tested this demo program in LG G3(Android5.0.1), Sony Z2(Android5.0.2) and Samsung Note3(Android 5.0), the status is same (but not right):
    1. If I select month( or day/year) by sliding the screen, the status is right;
    2. If I select month( or day/year) by clicking next month (or day/year), it will scroll one more item. For example, the current month is May, if I click June, finally July is selected.

  8. #8
    Sencha User
    Join Date
    Jul 2015
    Posts
    8

    Default

    We encountered several issues in Datepicker maybe because the event OnSlotPick is not invoked sometimes. Please access https://www.sencha.com/forum/showthr...55#post1119755 to check another issue.

  9. #9
    Sencha User
    Join Date
    Jul 2015
    Posts
    8

    Default

    Hi fmoseley,

    Do you still look at this issue? We encounter this issue in all latest Android devices (5.0 and later).

Similar Threads

  1. Replies: 2
    Last Post: 23 Apr 2013, 8:37 AM
  2. Setting custom date in DatePicker rather than the default today's date
    By SabaSarwat in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 13 Apr 2012, 5:28 AM
  3. Reg DatePicker - Unable to get the selected date in datepicker
    By sucheendarnath in forum Sencha Touch 1.x: Q&A
    Replies: 1
    Last Post: 31 Dec 2011, 7:19 AM
  4. [CLOSED-35] [3.x/2.x] DatePicker Picks wrong date
    By Sina in forum Ext 3.x: Bugs
    Replies: 59
    Last Post: 19 Oct 2010, 8:48 AM
  5. [FNR] DatePicker picks wrong date / month
    By vsevik in forum Ext GWT: Bugs (2.x)
    Replies: 3
    Last Post: 8 Apr 2010, 2:43 AM

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
  •