Skip to content

ion-datetime cannot handle min and max properly #7946

Closed
@NoNameProvided

Description

@NoNameProvided

Short description of the problem:

DateTime is empty (on iOS) when a min max is set within the same year.

What behavior are you expecting?

DateTime respects the min and max attributes and show the dates in the allowed range.

Steps to reproduce:

  1. Open the date-picker
  2. Realize it works totally incorrectly.
<ion-item>
  <ion-label>Date</ion-label>
  <ion-datetime displayFormat="DD MMMM" min="2017-01-15" max="2017-10-17" [(ngModel)]="myDate">
  </ion-datetime>
</ion-item>

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

No error in the console.

Which Ionic Version? 2.x

Plunker that shows an example of your issue

http://plnkr.co/edit/FAvwZdWaiYnx9Qif8LK4?p=preview

Run ionic info from terminal/cmd prompt: (paste output below)

ordova CLI: 6.3.1
Gulp version:  CLI version 1.2.2
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
ios-deploy version: 1.8.6 
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan
Node Version: v6.3.1
Xcode version: Xcode 7.3.1 Build version 7D1014 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions