Telerik Forums
Kendo UI for Angular Forum
1 answer
41 views

Once Kendo loader is shown and hidden, it resets the textbox type from password to text.
Can I get a solution to it. 

As I need the kendoTextBoxPrefixTemplate and cant use the kendoTextBox API inside <input/> to use a [type] variable and 
control the textBox type 

Here is the sample code: 

import { Component, AfterViewInit, OnInit, ViewChild } from'@angular/core';

import {
  LoaderType,
  LoaderThemeColor,
  LoaderSize,
} from '@progress/kendo-angular-indicators';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
@Component({
  selector: 'my-app',
  template: `
<div class="login-page--main-container">
  <kendo-card class="login-page--kendo-card" *ngIf="!showLoader">
    <div class="login-page--form-container">
      <form [formGroup]="loginForm" class="login-page--login-form" (ngSubmit)="onSubmit()">
        <div class="login-page--formfield">
          <div class="login-page--formfield-user">
            <kendo-formfield>
              <kendo-textbox
                class="login-page--textbox"
                formControlName="username"
                #username
                required
                placeholder="Username">
                <ng-template kendoTextBoxPrefixTemplate>
                  <img src="assets/content/images/login-images/profile.svg" alt="new" class="login-page--user-img" />
                </ng-template>
              </kendo-textbox>
              <kendo-formerror class="login-page-kendo-form-error">
                Username is required
              </kendo-formerror>
            </kendo-formfield>
          </div>
          <kendo-formfield>
            <kendo-textbox
              #textbox
              placeholder="Password"
              [clearButton]="true"
              class="login-page--textbox"
              formControlName="password">
              <ng-template kendoTextBoxSuffixTemplate>
                <button kendoButton look="clear" (click)="togglePasswordVisibility()"> Eye </button>
              </ng-template>
              <ng-template kendoTextBoxPrefixTemplate>
                <img src="assets/content/images/login-images/password.svg" alt="new" class="login-page--profile-img" />
              </ng-template>
            </kendo-textbox>
            <kendo-formerror class="login-page-kendo-form-error">
              Password is required
            </kendo-formerror>
          </kendo-formfield>
          <div class="login-page--forgot-div">
            <!-- Optional forgot password link -->
          </div>
        </div>
        <div>
          <button kendoButton class="login-page--signin-button" [disabled]="loginForm.invalid">
            Sign In
          </button>
        </div>
      </form>
    </div>
  </kendo-card>
  <div class="app-screen--loader" *ngIf="showLoader">
  <div class="example-item" *ngFor="let loader of loaders">
          <div class="example-item-title">{{ loader.type | titlecase }}</div>
          <div class="k-block">
            <kendo-loader
              [type]="loader.type"
              [themeColor]="loader.themeColor"
              [size]="loader.size"
            >
            </kendo-loader>
          </div>
        </div>
    <div>Signing in....</div>
  </div>
</div>
  `,
})
export class AppComponent implements AfterViewInit {
  public loginForm: FormGroup;
  public showLoader = false;
  public loaders = [
    {
      type: <LoaderType>'pulsing',
      themeColor: <LoaderThemeColor>'primary',
      size: <LoaderSize>'medium',
    },
    {
      type: <LoaderType>'infinite-spinner',
      themeColor: <LoaderThemeColor>'secondary',
      size: <LoaderSize>'medium',
    },
    {
      type: <LoaderType>'converging-spinner',
      themeColor: <LoaderThemeColor>'info',
      size: <LoaderSize>'medium',
    },
  ];
  @ViewChild('textbox') public textbox!: TextBoxComponent;
  constructor() {
    this.loginForm = new FormGroup({
      username: new FormControl('', Validators.required),
      password: new FormControl('', Validators.required),
    });
  }
  public ngAfterViewInit(): void {
    this.textbox.input.nativeElement.type = 'password';
  }
  public togglePasswordVisibility(): void {
    const inputEl = this.textbox.input.nativeElement;
    inputEl.type = inputEl.type === 'password' ? 'text' : 'password';
  }
  public async onSubmit() {
    if (this.loginForm.valid) {
      this.showLoader = true;
      await new Promise((resolve) => setTimeout(resolve, 1000));
      this.showLoader = false;
    }
  }
}

Martin Bechev
Telerik team
 answered on 12 Nov 2024
1 answer
35 views

Hi, can we use directives or something similar to change the appearance of the Kendo-Grid like

<kendo-grid  NewApparenceDirective [kendoGridBinding]="data()">

I need to create a reusable, very lightweight grid.

Removing the background (set it transparent), removing some borders, changing text size, and so on.

What is the way to accomplish and reuse it on a lot of our components

 

Thanks

Martin Bechev
Telerik team
 answered on 08 Nov 2024
1 answer
44 views


how to change the click function of the ellipsis in kendo ui kendo-scheduler-month-view?

i need to change the click function of the ellipsis on the shown screenshot below:

 




<kendo-scheduler
    [resources]="[]"
    [kendoSchedulerBinding]="events"
    [(selectedViewIndex)]="schedulerView"
    [slotClass]="getSlotClass"
    [selectedDate]="selectedDate"
    [slotDivisions]="1"
    [selectable]="true"
    [isSlotSelected]="isSlotSelected"
    (slotDragStart)="onSlotDragStart($event)"
    (slotDrag)="onSlotDrag($event)">

    <kendo-scheduler-month-view [eventHeight]="18" [eventClass]="getEventClass">
      <ng-template kendoSchedulerEventTemplate let-event="event" let-resources="resources">
        <ng-template *ngTemplateOutlet="eventTemplate; context: { $implicit: event.dataItem }"></ng-template>
      </ng-template>
    </kendo-scheduler-month-view>

</kendo-scheduler>
<kendo-scheduler
    [resources]="[]"
    [kendoSchedulerBinding]="events"
    [(selectedViewIndex)]="schedulerView"
    [slotClass]="getSlotClass"
    [selectedDate]="selectedDate"
    [slotDivisions]="1"
    [selectable]="true"
    [isSlotSelected]="isSlotSelected"
    (slotDragStart)="onSlotDragStart($event)"
    (slotDrag)="onSlotDrag($event)">

    <kendo-scheduler-month-view [eventHeight]="18" [eventClass]="getEventClass">
      <ng-template kendoSchedulerEventTemplate let-event="event" let-resources="resources">
        <ng-template *ngTemplateOutlet="eventTemplate; context: { $implicit: event.dataItem }"></ng-template>
      </ng-template>
    </kendo-scheduler-month-view>

</kendo-scheduler>

Yanmario
Telerik team
 answered on 08 Nov 2024
1 answer
66 views

Is there a built-in Kendo form class for a grid-type layout? I know that the GridLayout component is available, was hoping that there was something built-in already that would be more straightforward to implement.

Thanks

Martin Bechev
Telerik team
 answered on 01 Nov 2024
0 answers
51 views

Hello,

I'm working on a project where we have about 100 columns and rows can exceed 1000 rows.

 

The users want to enable CTL and shift selection but it doesn't work and I have 2 behaviors:

1- If I click quickly and simultaneously CTL and Select row it's works.

2 - If I start holding the CTL button and try to select row nothing happen and it takes long time to be selected.

can you tell me what the problem is exactly and if there is a bypass for it

Best regards

aziz
Top achievements
Rank 1
Iron
 asked on 01 Nov 2024
1 answer
58 views
How can I display the timeline component in reverse order? I can't find any parameter from the guide that could reverse it. https://www.telerik.com/kendo-angular-ui/components/layout/api/timelinecomponent#selector
Martin Bechev
Telerik team
 answered on 31 Oct 2024
1 answer
58 views
Does the kendoDragHandle have to be a direct child of the kendoDragTarget or can it be a grandchild, grand-grandchild, ect. of the kendoDragTarget?
Martin Bechev
Telerik team
 answered on 29 Oct 2024
0 answers
58 views
This login Page code , once the kendo loader is shown and hidden it resets the password textbox type to text.
Can i get a solution to it. 
As i need the
 kendoTextBoxPrefixTemplate and cant use the kendoTextBox API inside <input/> to use a [type] variable and
control the textBox type



import { ComponentAfterViewInitOnInitViewChild } from'@angular/core';

import {
  LoaderType,
  LoaderThemeColor,
  LoaderSize,
from '@progress/kendo-angular-indicators';
import { FormControlFormGroupValidators } from '@angular/forms';
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
@Component({
  selector: 'my-app',
  template: `
<div class="login-page--main-container">
  <kendo-card class="login-page--kendo-card" *ngIf="!showLoader">
    <div class="login-page--form-container">
      <form [formGroup]="loginForm" class="login-page--login-form" (ngSubmit)="onSubmit()">
        <div class="login-page--formfield">
          <div class="login-page--formfield-user">
            <kendo-formfield>
              <kendo-textbox
                class="login-page--textbox"
                formControlName="username"
                #username
                required
                placeholder="Username">
                <ng-template kendoTextBoxPrefixTemplate>
                  <img src="assets/content/images/login-images/profile.svg" alt="new" class="login-page--user-img" />
                </ng-template>
              </kendo-textbox>
              <kendo-formerror class="login-page-kendo-form-error">
                Username is required
              </kendo-formerror>
            </kendo-formfield>
          </div>
          <kendo-formfield>
            <kendo-textbox
              #textbox
              placeholder="Password"
              [clearButton]="true"
              class="login-page--textbox"
              formControlName="password">
              <ng-template kendoTextBoxSuffixTemplate>
                <button kendoButton look="clear" (click)="togglePasswordVisibility()"> Eye </button>
              </ng-template>
              <ng-template kendoTextBoxPrefixTemplate>
                <img src="assets/content/images/login-images/password.svg" alt="new" class="login-page--profile-img" />
              </ng-template>
            </kendo-textbox>
            <kendo-formerror class="login-page-kendo-form-error">
              Password is required
            </kendo-formerror>
          </kendo-formfield>
          <div class="login-page--forgot-div">
            <!-- Optional forgot password link -->
          </div>
        </div>
        <div>
          <button kendoButton class="login-page--signin-button" [disabled]="loginForm.invalid">
            Sign In
          </button>
        </div>
      </form>
    </div>
  </kendo-card>
  <div class="app-screen--loader" *ngIf="showLoader">
  <div class="example-item" *ngFor="let loader of loaders">
          <div class="example-item-title">{{ loader.type | titlecase }}</div>
          <div class="k-block">
            <kendo-loader
              [type]="loader.type"
              [themeColor]="loader.themeColor"
              [size]="loader.size"
            >
            </kendo-loader>
          </div>
        </div>
    <div>Signing in....</div>
  </div>
</div>
  `,
})
export class AppComponent implements AfterViewInit {
  public loginFormFormGroup;
  public showLoader = false;
  public loaders = [
    {
      type: <LoaderType>'pulsing',
      themeColor: <LoaderThemeColor>'primary',
      size: <LoaderSize>'medium',
    },
    {
      type: <LoaderType>'infinite-spinner',
      themeColor: <LoaderThemeColor>'secondary',
      size: <LoaderSize>'medium',
    },
    {
      type: <LoaderType>'converging-spinner',
      themeColor: <LoaderThemeColor>'info',
      size: <LoaderSize>'medium',
    },
  ];
  @ViewChild('textbox'public textbox!: TextBoxComponent;
  constructor() {
    this.loginForm = new FormGroup({
      username: new FormControl(''Validators.required),
      password: new FormControl(''Validators.required),
    });
  }
  public ngAfterViewInit(): void {
    this.textbox.input.nativeElement.type = 'password';
  }
  public togglePasswordVisibility(): void {
    const inputEl = this.textbox.input.nativeElement;
    inputEl.type = inputEl.type === 'password' ? 'text' : 'password';
  }
  public async onSubmit() {
    if (this.loginForm.valid) {
      this.showLoader = true;
      await new Promise((resolve=> setTimeout(resolve1000));
      this.showLoader = false;
    }
  }
}
Vinay
Top achievements
Rank 1
 asked on 29 Oct 2024
1 answer
36 views
Tried to use format property of labels but there can't customize it Also tried using visual but it gives error with kendo drawing library 
So I want simple way to format 1000 to 1K etc example of formatter for kendo-chart-value-axis-item using kendo UI angular without kendo drawing visual property 
Zornitsa
Telerik team
 answered on 28 Oct 2024
1 answer
56 views

Is it possible to bind the kendo angular date controls directly against a luxon date object?

I tried the following:

A direct binding results in a compile error:

    <kendo-label text="Luxon Date">
                <kendo-datepicker  [value]="luxonDate"
                  placeholder="Choose a date ..."
                ></kendo-datepicker>
              </kendo-label>

Error in src/app/app.component.ts (28:37)

Type 'DateTime' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 36 more.

 

A binding against a Javascript date, on the other hand, works

 <kendo-label text="JSDate">
                <kendo-datepicker  [value]="date"
                  placeholder="Choose a date ..."
                ></kendo-datepicker>
              </kendo-label>

 

Is there also a special adapter for the Kendo DatePicker like for Angular Material Date Components (@angular/material-luxon-adapter)?

Zornitsa
Telerik team
 answered on 23 Oct 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?