This is a migrated thread and some comments may be shown as answers.

Calendar Size

3 Answers 1547 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 31 Oct 2018, 09:50 AM

Hi

 

I may well be missing the obvious but how do you resize the calendar?

3 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 01 Nov 2018, 11:28 AM
Hi Paul,

Indeed, customizing the Calendar width and height is not as straight-forward as for most of the other Kendo UI for Angular components (that require simply adding an inline style or binding the style.styling-property-name property).

Due to the complex rendering of the Calendar, one can set a width to the wrapper, but will also need to cater for the inner elements so that the day indicators and the actual dates from the table stay in sync, e.g.:

https://stackblitz.com/edit/angular-np87kc?file=app/app.component.ts

Alternatively, you can scale the component by an arbitrary factor:

https://stackblitz.com/edit/angular-np87kc-mb9pwb?file=app/app.component.ts

I hope this helps, but please note that these approaches (and resizing the Calendar in general) are not officially supported and one should use them at their own discretion.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Eddie
Top achievements
Rank 1
answered on 30 Dec 2019, 06:26 PM

So to clarify, there is no way to make to look smaller than the native size.

Scaling it makes it blurry, does not keep it aligned to the container, and in result unusable.

Going into each element inside the calendar to adjust to a desirable size is not feasible either. Making it larger as shown above is do able because your not limiting the size of the navigation bar, once you limit the total width of the calendar to hinder the size of the navigation the work is increased exponentially.

 

Would you agree with these statements?

0
Svet
Telerik team
answered on 01 Jan 2020, 08:08 AM

Hi Paul,

Indeed, I have to admit that your statements are valid.

What else I can suggest as workaround in order to change the size of the Calendar is to adjust its font size using some custom CSS. Please check the following example demonstrating such approach:

https://stackblitz.com/edit/angular-gubhco-epw6jc?file=app/app.component.ts

import { Component } from '@angular/core';
 
@Component({
selector: 'my-app',
styles: [ '.k-calendar { font-size: 10px; }' ],
template: `
<kendo-calendar></kendo-calendar>
`
})
export class AppComponent {}

Unfortunately, at the moment there is no other option that can be used to control the size of the Calendar. Let us know in case any further assistance is required for this or any other Kendo UI for Angular related topic.

Regards,
Svetlin
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
J
Top achievements
Rank 1
Iron
Iron
commented on 15 Jul 2021, 08:08 AM

Hi,
after one and half year, is there any proper solution of resizing DatePicker? I'm struggling with this problem in my website quite much. I want to fit the picker popup into mobile resolution (i.e. width cca 350 px).
I tried scaling as you suggested and the popup is smaller, but as the picker textbox is not centered and so the picker popup is originally shifted to the left side and off the left edge, it does not fit into screen and is still off the left edge (even it is smaller). And the other tip to reduce font-size is useless for me in sense that the font is smaller but the spacing is the same so the popup size is the same as well.
Thanks for any advice.
J
Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Eddie
Top achievements
Rank 1
Svet
Telerik team
Share this question
or