#101701
admin
Keymaster

Hi davout,
We use this for testing:

<smart-date-time-picker
(change)="change($event)"
#datetimepicker
[calendarButton]="true"
[enableMouseWheelAction]="true"
[dropDownPosition]="'center-bottom'"
[spinButtons]="true"
[spinButtonsPosition]="'left'"
></smart-date-time-picker>

app.component.html

import { Component, ViewChild, OnInit, AfterViewInit } from '@angular/core';
import { DateTimePickerComponent } from '@smart-webcomponents-angular/datetimepicker';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements AfterViewInit, OnInit {
@ViewChild('datetimepicker', { read: DateTimePickerComponent, static: false }) datetimepicker: DateTimePickerComponent;
change(event): void {
console.log(event.detail.value);
}
ngOnInit(): void {
// onInit code.
}
ngAfterViewInit(): void {
// afterViewInit code.
this.init();
}
init(): void {
// init code.
}
}

The reported behavior cannot be reproduced. Please, share a Stackblitz sample showing incorrect behavior and instructions how to reproduce it.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/