Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.

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

Open

Description

@ionitron-bot

Original issue by @thisIsChetan on 2017-11-15T14:51:02Z

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
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

    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