locked
How to implement min,max validations for kendo angular datepicker component RRS feed

  • Question

  • User1489485493 posted

    <div>
    <kendo-datepicker
    name="date"
    [format]="'dd-MM-yyyy'"
    [min]="min"
    [max]="max"
    [navigation]="false"
    [(ngModel)]="user.birthdate"
    #date="ngModel"
    required [ngClass]="{ 'is-invalid': f.submitted && date.invalid }"></kendo-datepicker>
    <div *ngIf="f.submitted && date.invalid" class="invalid-feedback">
    <div *ngIf="date.errors.required" class="invalid-feedback">Date is required</div>

    <div *ngIf="date.errors?.min" class="invalid-feedback">mindate should be.....</div>
    </div>
    </div>

    the mindate validation is not working here.can any one provide solution.

    Thursday, June 20, 2019 11:58 AM

All replies

  • User839733648 posted

    Hi jamhitha,

    According to your description and code, I'm sorry that I could not reproduce your issue on my side. 

    I suggest that you could use F12 developer tools to check if there is any error message or information and then share that with us.

    According to that, it may be easier for us to give suggestions and help with you.

    Best Regards,

    Jenifer

    Friday, June 21, 2019 3:13 AM
  • User1489485493 posted

    Hi,

    <div *ngIf="date.errors?.min" class="invalid-feedback">mindate should be.....</div>

    If min date is not satisfied it should show message as "mindate should be....".But it is not showing 

    Friday, June 21, 2019 6:32 AM
  • User839733648 posted

    Hi jamhitha,

    <div *ngIf="date.errors?.min" class="invalid-feedback">mindate should be.....</div>

    If min date is not satisfied it should show message as "mindate should be....".But it is not showing 

    Do you mean that there is no error message or information on the F12 developer tool's console tab?

    But as far as I'm concerned, if the value is invalid or wrong way of the syntax, there may be information on the F12 developer tool to give you direction to slove the issue.

    Best Reagrds,

    Jenifer

    Monday, June 24, 2019 8:10 AM
  • User1489485493 posted

    Hi,

     there is no error message or information on the F12 developer tool's console tab.It is not firing if mindate not satisfying.

    Is there any alteranate way to implement mindate and maxdate validations for kendo angular datepicker component in template driven form

    Wednesday, June 26, 2019 7:41 AM