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> allows non existing dates to select #227

Open

Description

@ionitron-bot

Original issue by @Michazzz on 2017-08-01T09:43:35Z

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

I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
User is able to select non existing date for example 06/31/2017 or 02/29/2017

Expected behavior:
User should not be able to select non existing dates.

Steps to reproduce:
Add to you template ion-datetime

    <ion-datetime pickerFormat="YYYY-MM-DD" displayFormat="YYYY-MM-DD"  max="{{maxDate}}" min="{{minDate}}"
                      [(ngModel)]="temDate" (ionChange)="moveForward()" placeholder="{{selectedDate}}"></ion-datetime>
  1. Select date for example 07/31/2017, click 'Done' button. Correct date should be printed on .

  2. Click on to change date.

  3. Very carefully change month to June. The day should be still 31st.

  4. Click done button. The date should be printed on .

Other information:
I have some screenshot with this bug.

Ionic info: :

global packages:

    @ionic/cli-utils : 1.5.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.5.0

local packages:

    @ionic/app-scripts              : 1.3.12
    @ionic/cli-plugin-cordova       : 1.4.1
    @ionic/cli-plugin-ionic-angular : 1.3.2
    Cordova Platforms               : android 6.2.3
    Ionic Framework                 : ionic-angular 3.3.0

System:

    Node       : v6.10.3
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 3.10.10
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