yuyang041060120 / ng2-validation

angular2 validation
https://yuyang041060120.github.io/ng2-validation/index.html
MIT License
612 stars 213 forks source link

Input minDate throws errors #110

Open rsaenen opened 7 years ago

rsaenen commented 7 years ago

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 !

ryessekeyev commented 6 years ago

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

rsaenen commented 6 years ago

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

KiranWorks1061 commented 6 years ago

Hi,

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

Thanks

rsaenen commented 6 years ago

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

KiranWorks1061 commented 6 years ago

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();">
                                <span class="icofont icofont-ui-calendar"></span>
                            </div>

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 commented 6 years ago

Hi,

any one can suggest solution for above?

rsaenen commented 6 years ago

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