Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 bug: ion-datetime allows invalid values #14732

Simpler1 opened this issue Jul 7, 2018 · 1 comment


None yet
4 participants
Copy link

commented Jul 7, 2018

Bug Report

Ionic Info


   ionic (Ionic CLI)          : 4.0.0-rc.9 (/home/user1/.npm-global/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-alpha.7
   @angular-devkit/core       : 0.7.0-rc.0
   @angular-devkit/schematics : 0.7.0-rc.0
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0-rc.9
   @ionic/schematics-angular  : 1.0.0-rc.9


   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0


   Android SDK Tools : 26.1.1
   NodeJS            : v8.11.3 (/usr/bin/node)
   npm               : 5.6.0
   OS                : Linux 4.13


   ANDROID_HOME : /home/user1/Android

During date selection, this specific scenario allows user to select dates past the maximum date set by option, and also allows selection of Non-existent dates like September 31.

Also occurs with allowing selection of dates before minimum dates.

Steps to Reproduce

npm i -g ionic@rc
ionic start myApp blank --type=angular
cd myApp
ionic serve --livereload

Paste the following code into within the ion-content tags of src/app/pages/home/


Save the file

Chose August 31, 2018.
Hit Done.
Open date picker again.
Without touching anything else, change month to September.
Date will show September 31. even though September only has 30 days. Allows save.

Other scenarios
There are multiple scenarios that lead to similar problems:

Scenario 1:

Select September 30.
Click done.
Open and change month to October.
October 31 does not show up as an option. In order to get it to show up, user must first cause some other change event on the date, like selecting October 29, and then October 31 will show as an option.

Scenario 2:

Set a min date in options in html. i.e. 6/15/2017.
Open datepicker. Select 7/1/2017.
Hit done.
Open datepicker. Change month to June. The 1 will remain so date will be 6/1. Hit done.
Datepicker allows June 1 to be saved.

Related Code
Expected Behavior
Don't allow invalid dates to be entered.

Additional Context
This is an exact duplicate of #12070 which was closed without any investigation.

@ionitron-bot ionitron-bot bot added the triage label Jul 7, 2018

@brandyscarney brandyscarney added this to the @ionic/core milestone Jul 9, 2018

@ionitron-bot ionitron-bot bot removed the triage label Jul 9, 2018

@brandyscarney brandyscarney removed the datetime label Nov 29, 2018


This comment has been minimized.

Copy link

commented Feb 12, 2019

Hi there,

Thanks for the issue! I’ve added this to issue #16630 to keep track of. We’re going to close out the individual issues and address all of the Datetime issues at once. We’re not forgetting about your issue, just trying to keep them all together.

Thanks for using Ionic!

@ionic-team ionic-team deleted a comment from Simpler1 Feb 12, 2019

@ionic-team ionic-team locked as resolved and limited conversation to collaborators Feb 12, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.