1- /* eslint-disable class-methods-use-this */
21import dateLocalization from '@js/common/core/localization/date' ;
32import messageLocalization from '@js/common/core/localization/message' ;
43import config from '@js/core/config' ;
@@ -13,7 +12,6 @@ import { extend } from '@js/core/utils/extend';
1312import { inputType } from '@js/core/utils/support' ;
1413import { isDate as isDateType , isNumeric , isString } from '@js/core/utils/type' ;
1514import { getWindow , hasWindow } from '@js/core/utils/window' ;
16- import type { DxEvent } from '@js/events' ;
1715import type {
1816 DateLike ,
1917 DatePickerType ,
@@ -23,8 +21,8 @@ import type {
2321import type { ToolbarItem } from '@js/ui/popup' ;
2422import type { OptionChanged } from '@ts/core/widget/types' ;
2523import DropDownEditor from '@ts/ui/drop_down_editor/m_drop_down_editor' ;
24+ import type { ValueChangedEvent } from '@ts/ui/editor/editor' ;
2625
27- import type { ValueChangedEvent } from '../editor/editor' ;
2826import type { PopupProperties } from '../popup/m_popup' ;
2927import uiDateUtils from './date_utils' ;
3028import Calendar from './m_date_box.strategy.calendar' ;
@@ -208,7 +206,7 @@ class DateBox extends DropDownEditor<DateBoxBaseProperties> {
208206 const strategyName = this . _getStrategyName ( this . _getFormatType ( ) ) ;
209207 const strategy = STRATEGY_CLASSES [ strategyName ] ;
210208
211- if ( ! ( this . _strategy && this . _strategy . NAME === strategyName ) ) {
209+ if ( ! ( this . _strategy ? .NAME === strategyName ) ) {
212210 // eslint-disable-next-line new-cap
213211 this . _strategy = new strategy ( this ) ;
214212 }
@@ -465,7 +463,7 @@ class DateBox extends DropDownEditor<DateBoxBaseProperties> {
465463 }
466464 }
467465
468- _clearValueHandler ( e : DxEvent ) : void {
466+ _clearValueHandler ( e : ValueChangedEvent & { stopPropagation : ( ) => void } ) : void {
469467 this . option ( 'text' , '' ) ;
470468 super . _clearValueHandler ( e ) ;
471469 }
@@ -549,7 +547,7 @@ class DateBox extends DropDownEditor<DateBoxBaseProperties> {
549547 if ( this . _applyInternalValidation ( date ) . isValid ) {
550548 const displayedText = this . _getDisplayedText ( newValue ) ;
551549
552- if ( value && newValue && value . getTime ( ) === newValue . getTime ( ) && displayedText !== text ) {
550+ if ( value && value . getTime ( ) === newValue ? .getTime ( ) && displayedText !== text ) {
553551 this . _renderValue ( ) ;
554552 } else {
555553 this . dateValue ( newValue , e ) ;
0 commit comments