Open ionitron-bot[bot] opened 5 years ago
I've encountered an issue simliar to this when setting the max attribute on my ion-datetime in ionic 3.9. My angular form's field is always invalid, even though I can see and output it's value in the html (it's only requirement is that it be set).
Original issue by @sebastian-zarzycki-es on 2018-08-10T16:53:06Z
Bug Report
Ionic Info
Describe the Bug When using ion-datetime just to select and display time (HH:mm), it's not possible to get it to work correctly when using max attribute. While the picker correctly limits itself to just the hours specified (so, in the example below, no further than 15:15), the control itself remains invalid in Angular form, with error object { actualValue: NaN, requiredValue: NaN, max: true }.
Steps to Reproduce
<ion-datetime displayFormat="HH:mm" pickerFormat="HH:mm" max="15:15" [(ngModel)]="arrivalTime" name="arrivalTime" #arrivalTime="ngModel" required></ion-datetime>
Expected Behavior The control should be valid if the time is less than max.