ng2-validation icon indicating copy to clipboard operation
ng2-validation copied to clipboard

Input minDate throws errors

Open rsaenen opened this issue 6 years ago • 7 comments

Hi, I use ng-bootstrap datepicker with input [minDate] however ng2-validation takes that input too and throws an error.

It would be nice to have an input for disable the validation or convert the input into a valid datetime.

What do you think about this ?

Thanks !

rsaenen avatar Sep 25 '17 18:09 rsaenen

Hi, I'm facing the same problem. Have you found any solution?

ryessekeyev avatar Nov 21 '17 06:11 ryessekeyev

Hi, I forked this repo and published a new package as ng4-validators.

rsaenen avatar Nov 21 '17 07:11 rsaenen

Hi,

how can i stop minDate validation in template driven form, even after applying [minDate]="NgbDateStructvalue" ?

Thanks

KiranWorks1061 avatar Nov 22 '17 09:11 KiranWorks1061

Hi, Why would you stop the validation ? I dont get what you want to do...

rsaenen avatar Nov 22 '17 09:11 rsaenen

Hi,

we are using ngbdatepicker, we are assigning NgbDateStruct type value to minDate property in order to fix lower bound value for calendar.

<input class="form-control input-sm-4" [minDate]="minDate" placeholder="dd-mm-yyyy" name="appointmentOn" [(ngModel)]="appointmentdetails.AppointmentOn" ngbDatepicker #appointmentOn="ngbDatepicker" [disabled]="editmode" required> <div class="input-group-addon bg-default" (click)="appointmentOn.toggle();">

in .ts file: minDate = { year: 2017, month: 1, day: 1 };

When use like this, always form.valid showing false, even after selecting date in calendar.

Thanks,

KiranWorks1061 avatar Nov 22 '17 09:11 KiranWorks1061

Hi,

any one can suggest solution for above?

KiranWorks1061 avatar Nov 27 '17 15:11 KiranWorks1061

Hi, There is no activity since april. I made a PR a few month ago but it was never merge

rsaenen avatar Nov 27 '17 17:11 rsaenen