katemihalikova / ion-datetime-picker

Date and/or time picker for awesome Ionic framework
MIT License
169 stars 101 forks source link

"only-valid" is not working in ionic 3 #123

Closed sonicwong closed 6 years ago

sonicwong commented 6 years ago

My code: <ion-datetime picker [(ngModel)]="datetimeValue" only-valid="{'after': '2017-10-10'}" >

But all date still selectable.

sonicwong commented 6 years ago

Just found out the attribute should be: [onlyValid]="ov"

Where ov is a variable defined in ts and it is a json object: ov = {'after': '2017-10-10'};

katemihalikova commented 6 years ago

That's one solution, right. [onlyValid]="{'after': '2017-10-10'}" should work too.

sonicwong commented 6 years ago

It would be helpful if update the v3 readme: https://github.com/katemihalikova/ion-datetime-picker/blob/ionic3/README.md

mubasshir commented 6 years ago

Kindly add same to Readme