Is there any possibility to select / change only year from the Calender picker ?

1 Answer 66 Views
Calendar
Ranjith
Top achievements
Rank 1
Iron
Ranjith asked on 11 Jun 2021, 05:46 AM
From 11/06/2021 to 11/06/2020.. Only select the year and don't want to chosse the month and date. It should remain same. 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 15 Jun 2021, 09:16 AM

Hi Ranjith,

The required behavior could be achieved, by setting the topView and bottomView options:

https://www.telerik.com/kendo-angular-ui/components/dateinputs/calendar/view-depth/

The developer could also set the activeView option which determines the initial view when the user opens the popup (when DatePicker is used for example):

https://www.telerik.com/kendo-angular-ui/components/dateinputs/calendar/active-view/

Here is an example that demonstrates the suggested options:

https://stackblitz.com/edit/angular-sssdh2

I hope this helps.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ranjith
Top achievements
Rank 1
Iron
commented on 15 Jun 2021, 11:11 AM

Hi Martin..

Thanks for your response.

Actually I am looking for possibility to change / select either date only or month only or year only from the popup with all the 3 fields values to pick from in the Calendar picker and automatically the date gets updated with user selecting/changing either date only or month only or year only.But your solution has only one field value to pick from i.e year field.

Regards
Ranjith
Martin
Telerik team
commented on 18 Jun 2021, 07:19 AM

Hi Ranjith,

The developer can update the suggested properties dynamically, based on condition, setting them to any calendar view supported by CalendarView interface:

https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarView/

 

Tags
Calendar
Asked by
Ranjith
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
Share this question
or