diff --git a/packages/devextreme-angular/src/ui/calendar/index.ts b/packages/devextreme-angular/src/ui/calendar/index.ts index 7b49f90d5727..38a64c85251f 100644 --- a/packages/devextreme-angular/src/ui/calendar/index.ts +++ b/packages/devextreme-angular/src/ui/calendar/index.ts @@ -478,27 +478,14 @@ export class DxCalendarComponent extends DxComponent implements OnDestroy, Contr */ @Input() - get value(): Date | number | string { + get value(): Date | number | string | Array { return this._getOption('value'); } - set value(value: Date | number | string) { + set value(value: Date | number | string | Array) { this._setOption('value', value); } - /** - * [descr:dxCalendarOptions.values] - - */ - @Input() - get values(): Array { - return this._getOption('values'); - } - set values(value: Array) { - this._setOption('values', value); - } - - /** * [descr:WidgetOptions.visible] @@ -804,14 +791,7 @@ export class DxCalendarComponent extends DxComponent implements OnDestroy, Contr * This member supports the internal infrastructure and is not intended to be used directly from your code. */ - @Output() valueChange: EventEmitter; - - /** - - * This member supports the internal infrastructure and is not intended to be used directly from your code. - - */ - @Output() valuesChange: EventEmitter>; + @Output() valueChange: EventEmitter>; /** @@ -903,7 +883,6 @@ export class DxCalendarComponent extends DxComponent implements OnDestroy, Contr { emit: 'validationMessagePositionChange' }, { emit: 'validationStatusChange' }, { emit: 'valueChange' }, - { emit: 'valuesChange' }, { emit: 'visibleChange' }, { emit: 'weekNumberRuleChange' }, { emit: 'widthChange' }, @@ -949,7 +928,7 @@ export class DxCalendarComponent extends DxComponent implements OnDestroy, Contr super.ngOnChanges(changes); this.setupChanges('disabledDates', changes); this.setupChanges('validationErrors', changes); - this.setupChanges('values', changes); + this.setupChanges('value', changes); } setupChanges(prop: string, changes: SimpleChanges) { @@ -961,7 +940,7 @@ export class DxCalendarComponent extends DxComponent implements OnDestroy, Contr ngDoCheck() { this._idh.doCheck('disabledDates'); this._idh.doCheck('validationErrors'); - this._idh.doCheck('values'); + this._idh.doCheck('value'); this._watcherHelper.checkWatchers(); super.ngDoCheck(); super.clearChangedOptions(); diff --git a/packages/devextreme-angular/src/ui/nested/base/calendar-options.ts b/packages/devextreme-angular/src/ui/nested/base/calendar-options.ts index 89576ea2b3a6..5b10c45348a8 100644 --- a/packages/devextreme-angular/src/ui/nested/base/calendar-options.ts +++ b/packages/devextreme-angular/src/ui/nested/base/calendar-options.ts @@ -256,20 +256,13 @@ export abstract class DxoCalendarOptions extends NestedOption { this._setOption('validationStatus', value); } - get value(): Date | number | string { + get value(): Date | number | string | Array { return this._getOption('value'); } - set value(value: Date | number | string) { + set value(value: Date | number | string | Array) { this._setOption('value', value); } - get values(): Array { - return this._getOption('values'); - } - set values(value: Array) { - this._setOption('values', value); - } - get visible(): boolean { return this._getOption('visible'); } diff --git a/packages/devextreme-angular/src/ui/nested/calendar-options.ts b/packages/devextreme-angular/src/ui/nested/calendar-options.ts index 21d99e25c021..4deda9a6dec2 100644 --- a/packages/devextreme-angular/src/ui/nested/calendar-options.ts +++ b/packages/devextreme-angular/src/ui/nested/calendar-options.ts @@ -65,7 +65,6 @@ import { DxoCalendarOptions } from './base/calendar-options'; 'validationMessagePosition', 'validationStatus', 'value', - 'values', 'visible', 'weekNumberRule', 'width', @@ -79,7 +78,7 @@ export class DxoCalendarOptionsComponent extends DxoCalendarOptions implements O * This member supports the internal infrastructure and is not intended to be used directly from your code. */ - @Output() valueChange: EventEmitter; + @Output() valueChange: EventEmitter>; /** diff --git a/packages/devextreme-react/src/calendar.ts b/packages/devextreme-react/src/calendar.ts index 5c82c45765d7..3a1d25bc483e 100644 --- a/packages/devextreme-react/src/calendar.ts +++ b/packages/devextreme-react/src/calendar.ts @@ -21,9 +21,9 @@ type ICalendarOptions = React.PropsWithChildren React.ReactNode; cellComponent?: React.ComponentType; cellKeyFn?: (data: any) => string; - defaultValue?: any | number | string; + defaultValue?: any | Array | number | string; defaultZoomLevel?: "century" | "decade" | "month" | "year"; - onValueChange?: (value: any | number | string) => void; + onValueChange?: (value: any | Array | number | string) => void; onZoomLevelChange?: (value: "century" | "decade" | "month" | "year") => void; }> @@ -138,7 +138,6 @@ class Calendar extends BaseComponent> "invalid", "pending"]) ]), - values: PropTypes.array, visible: PropTypes.bool, weekNumberRule: PropTypes.oneOfType([ PropTypes.string, diff --git a/packages/devextreme-react/src/date-box.ts b/packages/devextreme-react/src/date-box.ts index 9903f8c4a774..86d8258e7ee8 100644 --- a/packages/devextreme-react/src/date-box.ts +++ b/packages/devextreme-react/src/date-box.ts @@ -315,14 +315,13 @@ type ICalendarOptionsProps = React.PropsWithChildren<{ validationMessageMode?: "always" | "auto"; validationMessagePosition?: "bottom" | "left" | "right" | "top"; validationStatus?: "valid" | "invalid" | "pending"; - value?: any | number | string; - values?: Array; + value?: any | Array | number | string; visible?: boolean; weekNumberRule?: "auto" | "firstDay" | "fullWeek" | "firstFourDays"; width?: (() => number | string) | number | string; zoomLevel?: "century" | "decade" | "month" | "year"; - defaultValue?: any | number | string; - onValueChange?: (value: any | number | string) => void; + defaultValue?: any | Array | number | string; + onValueChange?: (value: any | Array | number | string) => void; defaultZoomLevel?: "century" | "decade" | "month" | "year"; onZoomLevelChange?: (value: "century" | "decade" | "month" | "year") => void; cellRender?: (...params: any) => React.ReactNode; diff --git a/packages/devextreme-react/src/date-range-box.ts b/packages/devextreme-react/src/date-range-box.ts index 6646420c0fba..47d771f3c1ea 100644 --- a/packages/devextreme-react/src/date-range-box.ts +++ b/packages/devextreme-react/src/date-range-box.ts @@ -302,14 +302,13 @@ type ICalendarOptionsProps = React.PropsWithChildren<{ validationMessageMode?: "always" | "auto"; validationMessagePosition?: "bottom" | "left" | "right" | "top"; validationStatus?: "valid" | "invalid" | "pending"; - value?: any | number | string; - values?: Array; + value?: any | Array | number | string; visible?: boolean; weekNumberRule?: "auto" | "firstDay" | "fullWeek" | "firstFourDays"; width?: (() => number | string) | number | string; zoomLevel?: "century" | "decade" | "month" | "year"; - defaultValue?: any | number | string; - onValueChange?: (value: any | number | string) => void; + defaultValue?: any | Array | number | string; + onValueChange?: (value: any | Array | number | string) => void; defaultZoomLevel?: "century" | "decade" | "month" | "year"; onZoomLevelChange?: (value: "century" | "decade" | "month" | "year") => void; cellRender?: (...params: any) => React.ReactNode; diff --git a/packages/devextreme-vue/src/calendar.ts b/packages/devextreme-vue/src/calendar.ts index 6d74ecb32948..f56d961f29df 100644 --- a/packages/devextreme-vue/src/calendar.ts +++ b/packages/devextreme-vue/src/calendar.ts @@ -38,7 +38,6 @@ type AccessibleOptions = Pick { * @default null * @public */ - value?: Date | number | string; - /** - * @docid - * @default [] - * @public - */ - values?: Array; + value?: Date | number | string | Array; /** * @docid * @default 'month' diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index dab4dc0ad34b..cbee855e170d 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -9079,11 +9079,7 @@ declare module DevExpress.ui { /** * [descr:dxCalendarOptions.value] */ - value?: Date | number | string; - /** - * [descr:dxCalendarOptions.values] - */ - values?: Array; + value?: Date | number | string | Array; /** * [descr:dxCalendarOptions.zoomLevel] */