doorman
doorman

Reputation: 16949

Restrict kendo-date-picker to months and years

I have the following angularjs html syntax for the kendo-date-picker:

 <input type="text"
 ng-model="endDate"
 ng-change="collapseAll()"
 xt-validation
 k-format="'dd.MM.yyyy'"
 k-parse-formats="['ddMMyyyy']"
 kendo-date-picker
 msg-required="Please specify an end date." />

Is it possible to restrict the calendar view to only show months and the years view?

Upvotes: 2

Views: 569

Answers (1)

Lex
Lex

Reputation: 7194

You can pass options to the Kendo datepicker to tell it that you want to start the display and select the date at the year level. Add a k-options attribute with the following:

k-options="{ start: 'year', depth: 'year' }"

Upvotes: 2

Related Questions