Skip to content

ion-datetime picker selects invalid and out of min max range dates #13430

Closed

Description

@thisIsChetan

Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x
[ ] 4.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request

Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
Under certain condition as mentioned in steps to reproduce, ion-datetime picker selects invalid dates like Nov 31. Also, it selects dates which are out of bound i.e. greater than max and lesser than min.

Expected behavior:
ion-date time should respect min max limits under mentioned Scenarios.

Steps to reproduce:
Scenario 1: Step to reproduce:

Select any value with 31 as a date. eg select October 31 2017
Click done button of ion-datetime picker
Tap again on ion-datetime
Change month from October to November without touching date or year values
Observe that November 31 2017 gets selected which is an invalid date

Scenario 2: Step to reproduce:

Select any value with date greater than 15. eg select November 20 2017
Click done button of ion-datetime picker
Tap again on ion-datetime
Change month from November to December without touching date or year values
Observe that December 20 2017 gets selected which is greater than max allowed date value

Related code:
Follow this link
https://stackblitz.com/edit/ionic-go89ym

insert short code snippets here

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

    @ionic/cli-utils  : 1.13.0
    ionic (Ionic CLI) : 3.13.0

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.7.1

System:

    ios-deploy : 1.9.2
    ios-sim    : 4.1.1
    Node       : v6.10.2
    npm        : 3.10.10
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002

Misc:

    backend : legacy

Activity

  1. changed the title [-]ion-datetime picker selects invalid and out of min mac range dates[/-] [+]ion-datetime picker selects invalid and out of min max range dates[/+] on Nov 15, 2017
  2. lalit-kumar2 commented on Nov 16, 2017

    @lalit-kumar2

    I am having same issue. I would appreciate if someone could help.

  3. avinashjgtp10 commented on Nov 16, 2017

    @avinashjgtp10

    Any solution for this?

  4. sudattadesai72 commented on Nov 16, 2017

    @sudattadesai72

    Facing same bug. Can this be fixed soon??

  5. added this to the milestone on Nov 16, 2017
  6. christianguevara commented on Nov 16, 2017

    @christianguevara

    I think is the same as #12319 and here is the commit for the Fix i have tested and it work.

  7. olivercodes commented on Dec 8, 2017

    @olivercodes
    Contributor

    @eisene stopped replying, so I made a PR.

    #13529

  8. ionitron-bot commented on Dec 7, 2018

    @ionitron-bot

    Thanks for the issue! We have moved the source code and issues for Ionic 3 into a separate repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

    Thank you for using Ionic!

  9. ionitron-bot commented on Dec 7, 2018

    @ionitron-bot

    Issue moved to: ionic-team/ionic-v3#825

  10. locked and limited conversation to collaborators on Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions