2

I'm using the new [Datepicker from telerik Kendo UI][1]

The datepicker is working great but I have 1 problem, when my date value is not defined it displays undefined like this:

[![enter image description here][2]][2]

However looking at [this plunker][3] I see that it's possible to display a default value, but I can't figure out how.

here's my current code:

<kendo-datepicker id="pickDateStart"
                  #pickDateStart="ngModel"
                  name="pickDateStart"                                             
                  [format]="'dd/mm/yy'"
                  [(value)]="absenceReservation.StartDate"
                  [(ngModel)]="absenceReservation.StartDate"
                  [class.has-error]="pickDateStart.invalid && showValidation"
                  [tooltip]="errors_startDate"
                  [isDisabled]="!showValidation"
                  (valueChange)="setDateRange($event)"
                  placement="bottom"
                  ngModel required>

</kendo-datepicker>

<template #errors_startDate>
    <div *ngIf="pickDateStart.errors?.required">
        <i class="fa fa-exclamation-circle"></i> {{"itemIsRequired" | translate }}
    </div>
</template>

How can I display a default placeholder in the input field, or the date format (something cleaner then "Undefined") [1]: https://www.telerik.com/kendo-angular-ui/components/dateinputs/datepicker/ [2]: https://i.sstatic.net/KpP3l.png [3]: https://embed.plnkr.co/jYcy8YUTVePlUUDJspwA/

1
  • are you sure that the placeholder is in the standard date-time format? Commented May 4, 2017 at 15:27

1 Answer 1

3

The proper culture data should be loaded in order to display the correct placeholder messages. A through discussion on the topic can be found in this Github issue:

https://github.com/telerik/kendo-angular/issues/499

Here you can find a working example:

https://github.com/telerik/kendo-angular/issues/499#issuecomment-297393561

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.