@progress/kendo-react-dateinputs 4.13.0-dev.202111291459 → 4.13.0-dev.202111300702
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/dist/es/calendar/components/Calendar.d.ts +43 -9
- package/dist/es/calendar/components/Calendar.js +48 -28
- package/dist/es/calendar/components/MultiViewCalendar.d.ts +51 -19
- package/dist/es/calendar/components/MultiViewCalendar.js +64 -37
- package/dist/es/dateinput/DateInput.d.ts +46 -4
- package/dist/es/dateinput/DateInput.js +64 -43
- package/dist/es/datepicker/DatePicker.d.ts +63 -9
- package/dist/es/datepicker/DatePicker.js +68 -47
- package/dist/es/daterangepicker/DateRangePicker.d.ts +51 -11
- package/dist/es/daterangepicker/DateRangePicker.js +60 -32
- package/dist/es/datetimepicker/DateTimePicker.d.ts +54 -4
- package/dist/es/datetimepicker/DateTimePicker.js +54 -33
- package/dist/es/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/es/main.d.ts +8 -8
- package/dist/es/main.js +8 -8
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimePicker.d.ts +58 -4
- package/dist/es/timepicker/TimePicker.js +59 -38
- package/dist/es/utils.d.ts +4 -0
- package/dist/es/utils.js +20 -0
- package/dist/npm/calendar/components/Calendar.d.ts +43 -9
- package/dist/npm/calendar/components/Calendar.js +48 -28
- package/dist/npm/calendar/components/MultiViewCalendar.d.ts +51 -19
- package/dist/npm/calendar/components/MultiViewCalendar.js +62 -35
- package/dist/npm/dateinput/DateInput.d.ts +46 -4
- package/dist/npm/dateinput/DateInput.js +64 -43
- package/dist/npm/datepicker/DatePicker.d.ts +63 -9
- package/dist/npm/datepicker/DatePicker.js +67 -46
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +51 -11
- package/dist/npm/daterangepicker/DateRangePicker.js +58 -30
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +54 -4
- package/dist/npm/datetimepicker/DateTimePicker.js +53 -32
- package/dist/npm/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/npm/main.d.ts +8 -8
- package/dist/npm/main.js +7 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/TimePicker.d.ts +58 -4
- package/dist/npm/timepicker/TimePicker.js +58 -37
- package/dist/npm/utils.d.ts +4 -0
- package/dist/npm/utils.js +21 -0
- package/dist/systemjs/kendo-react-dateinputs.js +1 -1
- package/package.json +14 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { Action, SelectionRange, CalendarViewEnum, SelectionRangeEnd, MultiViewCalendarSettings } from '../models';
|
|
3
|
+
import { Action, ActiveView, SelectionRange, CalendarViewEnum, SelectionRangeEnd, MultiViewCalendarSettings } from '../models';
|
|
4
4
|
/**
|
|
5
5
|
* The arguments for the `onChange` event of the MultiViewCalendar. * The generic argument sets the target type of the event. Defaults to `MultiViewCalendar`.
|
|
6
6
|
*/
|
|
@@ -13,7 +13,7 @@ export interface MultiViewCalendarChangeEvent<T = MultiViewCalendar> {
|
|
|
13
13
|
/**
|
|
14
14
|
* Represents the props of the [KendoReact MultiViewCalendar component]({% slug overview_multiviewcalendar %}). The generic argument is passed to the `onChange` property and is used as a target in the [`MultiViewCalendarChangeEvent`]({% slug api_dateinputs_multiviewcalendarchangeevent %}) interface.
|
|
15
15
|
*/
|
|
16
|
-
export interface MultiViewCalendarProps<T =
|
|
16
|
+
export interface MultiViewCalendarProps<T = any> extends MultiViewCalendarSettings {
|
|
17
17
|
/** @hidden */
|
|
18
18
|
_ref?: (instance: {
|
|
19
19
|
element: HTMLDivElement | null;
|
|
@@ -39,20 +39,22 @@ export interface MultiViewCalendarState {
|
|
|
39
39
|
activeView: CalendarViewEnum;
|
|
40
40
|
focusedDate: Date;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
/** @hidden */
|
|
43
|
+
export declare class MultiViewCalendarWithoutContext extends React.Component<MultiViewCalendarProps, MultiViewCalendarState> {
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
static displayName: string;
|
|
43
48
|
/**
|
|
44
49
|
* @hidden
|
|
45
50
|
*/
|
|
46
51
|
static propTypes: {
|
|
47
|
-
activeRangeEnd: PropTypes.Requireable<
|
|
52
|
+
activeRangeEnd: PropTypes.Requireable<SelectionRangeEnd>;
|
|
48
53
|
allowReverse: PropTypes.Requireable<boolean>;
|
|
49
|
-
bottomView: PropTypes.Requireable<
|
|
54
|
+
bottomView: PropTypes.Requireable<ActiveView>;
|
|
50
55
|
className: PropTypes.Requireable<string>;
|
|
51
|
-
defaultActiveView: PropTypes.Requireable<
|
|
52
|
-
defaultValue: PropTypes.Requireable<
|
|
53
|
-
start: PropTypes.Requireable<Date>;
|
|
54
|
-
end: PropTypes.Requireable<Date>;
|
|
55
|
-
}>>;
|
|
56
|
+
defaultActiveView: PropTypes.Requireable<ActiveView>;
|
|
57
|
+
defaultValue: PropTypes.Requireable<any>;
|
|
56
58
|
disabled: PropTypes.Requireable<boolean>;
|
|
57
59
|
focusedDate: PropTypes.Requireable<Date>;
|
|
58
60
|
id: PropTypes.Requireable<string>;
|
|
@@ -60,16 +62,13 @@ export declare class MultiViewCalendar extends React.Component<MultiViewCalendar
|
|
|
60
62
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
61
63
|
max: PropTypes.Requireable<Date>;
|
|
62
64
|
min: PropTypes.Requireable<Date>;
|
|
63
|
-
mode: PropTypes.Requireable<
|
|
65
|
+
mode: PropTypes.Requireable<import("../models").MultiViewCalendarMode>;
|
|
64
66
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
67
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
66
68
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
67
69
|
tabIndex: PropTypes.Requireable<number>;
|
|
68
|
-
topView: PropTypes.Requireable<
|
|
69
|
-
value: PropTypes.Requireable<
|
|
70
|
-
start: PropTypes.Requireable<Date>;
|
|
71
|
-
end: PropTypes.Requireable<Date>;
|
|
72
|
-
}>>;
|
|
70
|
+
topView: PropTypes.Requireable<ActiveView>;
|
|
71
|
+
value: PropTypes.Requireable<any>;
|
|
73
72
|
views: (props: any, propName: any, componentName: any) => Error;
|
|
74
73
|
weekNumber: PropTypes.Requireable<boolean>;
|
|
75
74
|
};
|
|
@@ -81,11 +80,11 @@ export declare class MultiViewCalendar extends React.Component<MultiViewCalendar
|
|
|
81
80
|
min: Date;
|
|
82
81
|
max: Date;
|
|
83
82
|
navigation: boolean;
|
|
84
|
-
defaultActiveView:
|
|
83
|
+
defaultActiveView: ActiveView;
|
|
85
84
|
defaultValue: any;
|
|
86
|
-
topView:
|
|
85
|
+
topView: ActiveView;
|
|
87
86
|
tabIndex: number;
|
|
88
|
-
bottomView:
|
|
87
|
+
bottomView: ActiveView;
|
|
89
88
|
views: number;
|
|
90
89
|
allowReverse: boolean;
|
|
91
90
|
};
|
|
@@ -165,3 +164,36 @@ export declare class MultiViewCalendar extends React.Component<MultiViewCalendar
|
|
|
165
164
|
private handleViewChange;
|
|
166
165
|
private handleDateChange;
|
|
167
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Represents the PropsContext of the `MultiViewCalendar` component.
|
|
169
|
+
* Used for global configuration of all `MultiViewCalendar` instances.
|
|
170
|
+
*
|
|
171
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
172
|
+
*/
|
|
173
|
+
export declare const MultiViewCalendarPropsContext: React.Context<(p: MultiViewCalendarProps<any>) => MultiViewCalendarProps<any>>;
|
|
174
|
+
/**
|
|
175
|
+
* Represent the `ref` of the MultiViewCalendar component.
|
|
176
|
+
*/
|
|
177
|
+
export interface MultiViewCalendarHandle extends Pick<MultiViewCalendarWithoutContext, keyof MultiViewCalendarWithoutContext> {
|
|
178
|
+
/**
|
|
179
|
+
* Returns the HTML element of the MultiViewCalendar component.
|
|
180
|
+
*/
|
|
181
|
+
element: HTMLDivElement | null;
|
|
182
|
+
/**
|
|
183
|
+
* Gets the current focused date of the MultiViewCalendar.
|
|
184
|
+
*/
|
|
185
|
+
focusedDate: Date;
|
|
186
|
+
/**
|
|
187
|
+
* Gets the value of the MultiViewCalendar.
|
|
188
|
+
*/
|
|
189
|
+
value: Date | Date[] | SelectionRange | null;
|
|
190
|
+
}
|
|
191
|
+
/** @hidden */
|
|
192
|
+
export declare type MultiViewCalendar = MultiViewCalendarHandle;
|
|
193
|
+
/**
|
|
194
|
+
* Represents the KendoReact MultiViewCalendar Component.
|
|
195
|
+
*
|
|
196
|
+
* Accepts properties of type [MultiViewCalendarProps]({% slug api_dateinputs_multiviewcalendarprops %}).
|
|
197
|
+
* Obtaining the `ref` returns an object of type [MultiViewCalendarHandle]({% slug api_dateinputs_multiviewcalendarhandle %}).
|
|
198
|
+
*/
|
|
199
|
+
export declare const MultiViewCalendar: React.ForwardRefExoticComponent<MultiViewCalendarProps<any> & React.RefAttributes<any>>;
|
|
@@ -39,15 +39,15 @@ var utils_1 = require("../../utils");
|
|
|
39
39
|
var HorizontalViewList_1 = require("./HorizontalViewList");
|
|
40
40
|
var TodayCommand_1 = require("./TodayCommand");
|
|
41
41
|
var extractDateFromValue = function (min, max, value) {
|
|
42
|
-
if (min === void 0) { min =
|
|
43
|
-
if (max === void 0) { max =
|
|
42
|
+
if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
|
|
43
|
+
if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
|
|
44
44
|
return value instanceof Date && !Array.isArray(value) && utils_1.isInRange(kendo_date_math_1.getDate(value), min, max)
|
|
45
45
|
? kendo_date_math_1.getDate(value)
|
|
46
46
|
: null;
|
|
47
47
|
};
|
|
48
48
|
var extractMultipleFromValue = function (min, max, value) {
|
|
49
|
-
if (min === void 0) { min =
|
|
50
|
-
if (max === void 0) { max =
|
|
49
|
+
if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
|
|
50
|
+
if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
|
|
51
51
|
return Array.isArray(value)
|
|
52
52
|
? value.filter(function (date) { return utils_1.isInRange(date, min, max); }).map(function (date) { return kendo_date_math_1.getDate(date); })
|
|
53
53
|
: null;
|
|
@@ -67,9 +67,10 @@ var extractActiveRange = function (range, single) {
|
|
|
67
67
|
? 'end'
|
|
68
68
|
: 'start';
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
/** @hidden */
|
|
71
|
+
var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
72
|
+
__extends(MultiViewCalendarWithoutContext, _super);
|
|
73
|
+
function MultiViewCalendarWithoutContext(props) {
|
|
73
74
|
var _this = _super.call(this, props) || this;
|
|
74
75
|
_this.selectedDate = null;
|
|
75
76
|
_this.selectedMultiple = null;
|
|
@@ -115,7 +116,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
115
116
|
};
|
|
116
117
|
_this.isListInRange = function (list) {
|
|
117
118
|
return _this.min < list[0]
|
|
118
|
-
&& _this.max > list[Math.max(0, (_this.props.views ||
|
|
119
|
+
&& _this.max > list[Math.max(0, (_this.props.views || MultiViewCalendarWithoutContext.defaultProps.views) - 1)];
|
|
119
120
|
};
|
|
120
121
|
_this.navigate = function (action) {
|
|
121
122
|
_this.calculateFocusFromValue = false;
|
|
@@ -289,7 +290,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
289
290
|
};
|
|
290
291
|
var value = props.value !== undefined
|
|
291
292
|
? props.value
|
|
292
|
-
: props.defaultValue ||
|
|
293
|
+
: props.defaultValue || MultiViewCalendarWithoutContext.defaultProps.defaultValue;
|
|
293
294
|
var selectedDate = extractDateFromValue(_this.min, _this.max, value);
|
|
294
295
|
var selectedMultiple = extractMultipleFromValue(_this.min, _this.max, value);
|
|
295
296
|
var selectedRange = extractRangeFromValue(value);
|
|
@@ -309,7 +310,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
309
310
|
_this.lastViewsCount = _this.props.views || HorizontalViewList_1.HorizontalViewList.defaultProps.views;
|
|
310
311
|
return _this;
|
|
311
312
|
}
|
|
312
|
-
Object.defineProperty(
|
|
313
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "element", {
|
|
313
314
|
/**
|
|
314
315
|
* Gets the wrapping element of the MultiViewCalendar component.
|
|
315
316
|
*/
|
|
@@ -319,7 +320,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
319
320
|
enumerable: true,
|
|
320
321
|
configurable: true
|
|
321
322
|
});
|
|
322
|
-
Object.defineProperty(
|
|
323
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "value", {
|
|
323
324
|
/**
|
|
324
325
|
* Gets the value of the MultiViewCalendar.
|
|
325
326
|
*/
|
|
@@ -333,7 +334,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
333
334
|
enumerable: true,
|
|
334
335
|
configurable: true
|
|
335
336
|
});
|
|
336
|
-
Object.defineProperty(
|
|
337
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "focusedDate", {
|
|
337
338
|
/**
|
|
338
339
|
* Gets the current focused date of the MultiViewCalendar.
|
|
339
340
|
*/
|
|
@@ -343,43 +344,43 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
343
344
|
enumerable: true,
|
|
344
345
|
configurable: true
|
|
345
346
|
});
|
|
346
|
-
Object.defineProperty(
|
|
347
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "min", {
|
|
347
348
|
get: function () {
|
|
348
349
|
return kendo_date_math_1.getDate(this.props.min !== undefined
|
|
349
350
|
? this.props.min
|
|
350
|
-
:
|
|
351
|
+
: MultiViewCalendarWithoutContext.defaultProps.min);
|
|
351
352
|
},
|
|
352
353
|
enumerable: true,
|
|
353
354
|
configurable: true
|
|
354
355
|
});
|
|
355
|
-
Object.defineProperty(
|
|
356
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "max", {
|
|
356
357
|
get: function () {
|
|
357
358
|
return kendo_date_math_1.getDate(this.props.max !== undefined
|
|
358
359
|
? this.props.max
|
|
359
|
-
:
|
|
360
|
+
: MultiViewCalendarWithoutContext.defaultProps.max);
|
|
360
361
|
},
|
|
361
362
|
enumerable: true,
|
|
362
363
|
configurable: true
|
|
363
364
|
});
|
|
364
|
-
Object.defineProperty(
|
|
365
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "bottomView", {
|
|
365
366
|
get: function () {
|
|
366
367
|
return models_1.CalendarViewEnum[this.props.bottomView !== undefined
|
|
367
368
|
? this.props.bottomView
|
|
368
|
-
:
|
|
369
|
+
: MultiViewCalendarWithoutContext.defaultProps.bottomView];
|
|
369
370
|
},
|
|
370
371
|
enumerable: true,
|
|
371
372
|
configurable: true
|
|
372
373
|
});
|
|
373
|
-
Object.defineProperty(
|
|
374
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "topView", {
|
|
374
375
|
get: function () {
|
|
375
376
|
return models_1.CalendarViewEnum[this.props.topView !== undefined
|
|
376
377
|
? this.props.topView
|
|
377
|
-
:
|
|
378
|
+
: MultiViewCalendarWithoutContext.defaultProps.topView];
|
|
378
379
|
},
|
|
379
380
|
enumerable: true,
|
|
380
381
|
configurable: true
|
|
381
382
|
});
|
|
382
|
-
Object.defineProperty(
|
|
383
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "activeRange", {
|
|
383
384
|
get: function () {
|
|
384
385
|
return this.props.activeRangeEnd !== undefined
|
|
385
386
|
? this.props.activeRangeEnd
|
|
@@ -388,7 +389,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
388
389
|
enumerable: true,
|
|
389
390
|
configurable: true
|
|
390
391
|
});
|
|
391
|
-
Object.defineProperty(
|
|
392
|
+
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "todayIsInRange", {
|
|
392
393
|
get: function () {
|
|
393
394
|
return utils_1.isInRange(utils_1.getToday(), kendo_date_math_1.getDate(this.min), kendo_date_math_1.getDate(this.max));
|
|
394
395
|
},
|
|
@@ -398,13 +399,13 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
398
399
|
/**
|
|
399
400
|
* @hidden
|
|
400
401
|
*/
|
|
401
|
-
|
|
402
|
+
MultiViewCalendarWithoutContext.prototype.componentDidMount = function () {
|
|
402
403
|
this.calculateFocusFromValue = true;
|
|
403
404
|
};
|
|
404
405
|
/**
|
|
405
406
|
* @hidden
|
|
406
407
|
*/
|
|
407
|
-
|
|
408
|
+
MultiViewCalendarWithoutContext.prototype.componentDidUpdate = function () {
|
|
408
409
|
if (this.calendarViewList) {
|
|
409
410
|
(this.isActive ? this.calendarViewList.focusActiveDate : this.calendarViewList.blurActiveDate)();
|
|
410
411
|
}
|
|
@@ -418,7 +419,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
418
419
|
/**
|
|
419
420
|
* @hidden
|
|
420
421
|
*/
|
|
421
|
-
|
|
422
|
+
MultiViewCalendarWithoutContext.prototype.render = function () {
|
|
422
423
|
var _this = this;
|
|
423
424
|
if (this.props._ref) {
|
|
424
425
|
this.props._ref(this);
|
|
@@ -466,16 +467,23 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
466
467
|
/**
|
|
467
468
|
* @hidden
|
|
468
469
|
*/
|
|
469
|
-
|
|
470
|
+
MultiViewCalendarWithoutContext.displayName = 'MultiViewCalendar';
|
|
471
|
+
/**
|
|
472
|
+
* @hidden
|
|
473
|
+
*/
|
|
474
|
+
MultiViewCalendarWithoutContext.propTypes = {
|
|
470
475
|
activeRangeEnd: PropTypes.oneOf(['start', 'end']),
|
|
471
476
|
allowReverse: PropTypes.bool,
|
|
472
477
|
bottomView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
|
|
473
478
|
className: PropTypes.string,
|
|
474
479
|
defaultActiveView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
|
|
475
480
|
defaultValue: PropTypes.oneOfType([
|
|
476
|
-
PropTypes.instanceOf(Date),
|
|
481
|
+
utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
477
482
|
PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
478
|
-
PropTypes.shape({
|
|
483
|
+
PropTypes.shape({
|
|
484
|
+
start: utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
485
|
+
end: utils_1.nullable(PropTypes.instanceOf(Date))
|
|
486
|
+
})
|
|
479
487
|
]),
|
|
480
488
|
disabled: PropTypes.bool,
|
|
481
489
|
focusedDate: PropTypes.instanceOf(Date),
|
|
@@ -491,9 +499,12 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
491
499
|
tabIndex: PropTypes.number,
|
|
492
500
|
topView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
|
|
493
501
|
value: PropTypes.oneOfType([
|
|
494
|
-
PropTypes.instanceOf(Date),
|
|
502
|
+
utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
495
503
|
PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
496
|
-
PropTypes.shape({
|
|
504
|
+
PropTypes.shape({
|
|
505
|
+
start: utils_1.nullable(PropTypes.instanceOf(Date).isRequired),
|
|
506
|
+
end: utils_1.nullable(PropTypes.instanceOf(Date).isRequired)
|
|
507
|
+
})
|
|
497
508
|
]),
|
|
498
509
|
views: function (props, propName, componentName) {
|
|
499
510
|
var views = props[propName];
|
|
@@ -508,7 +519,7 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
508
519
|
/**
|
|
509
520
|
* @hidden
|
|
510
521
|
*/
|
|
511
|
-
|
|
522
|
+
MultiViewCalendarWithoutContext.defaultProps = {
|
|
512
523
|
disabled: false,
|
|
513
524
|
min: defaults_1.MIN_DATE,
|
|
514
525
|
max: defaults_1.MAX_DATE,
|
|
@@ -521,8 +532,24 @@ var MultiViewCalendar = /** @class */ (function (_super) {
|
|
|
521
532
|
views: 2,
|
|
522
533
|
allowReverse: false
|
|
523
534
|
};
|
|
524
|
-
return
|
|
535
|
+
return MultiViewCalendarWithoutContext;
|
|
525
536
|
}(React.Component));
|
|
526
|
-
exports.
|
|
527
|
-
|
|
528
|
-
|
|
537
|
+
exports.MultiViewCalendarWithoutContext = MultiViewCalendarWithoutContext;
|
|
538
|
+
/**
|
|
539
|
+
* Represents the PropsContext of the `MultiViewCalendar` component.
|
|
540
|
+
* Used for global configuration of all `MultiViewCalendar` instances.
|
|
541
|
+
*
|
|
542
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
543
|
+
*/
|
|
544
|
+
exports.MultiViewCalendarPropsContext = kendo_react_common_1.createPropsContext();
|
|
545
|
+
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
546
|
+
/**
|
|
547
|
+
* Represents the KendoReact MultiViewCalendar Component.
|
|
548
|
+
*
|
|
549
|
+
* Accepts properties of type [MultiViewCalendarProps]({% slug api_dateinputs_multiviewcalendarprops %}).
|
|
550
|
+
* Obtaining the `ref` returns an object of type [MultiViewCalendarHandle]({% slug api_dateinputs_multiviewcalendarhandle %}).
|
|
551
|
+
*/
|
|
552
|
+
exports.MultiViewCalendar = kendo_react_common_1.withPropsContext(exports.MultiViewCalendarPropsContext, MultiViewCalendarWithoutContext);
|
|
553
|
+
exports.MultiViewCalendar.displayName = 'KendoReactMultiViewCalendar';
|
|
554
|
+
kendo_react_intl_1.registerForIntl(MultiViewCalendarWithoutContext);
|
|
555
|
+
kendo_react_intl_1.registerForLocalization(MultiViewCalendarWithoutContext);
|
|
@@ -15,7 +15,7 @@ export interface DateInputChangeEvent<T = DateInput> {
|
|
|
15
15
|
/**
|
|
16
16
|
* Represents the props of the [KendoReact DateInput component]({% slug overview_dateinput %}). The generic argument is passed to the `onChange` property and is used as a target in the [`DateInputChangeEvent`]({% slug api_dateinputs_dateinputchangeevent %}) interface.
|
|
17
17
|
*/
|
|
18
|
-
export interface DateInputProps<T =
|
|
18
|
+
export interface DateInputProps<T extends DateInput = any> extends FormComponentProps, DateInputSettings {
|
|
19
19
|
/** @hidden */
|
|
20
20
|
_ref?: React.MutableRefObject<DateInput | null>;
|
|
21
21
|
/**
|
|
@@ -43,9 +43,14 @@ export interface DateInputProps<T = DateInput> extends FormComponentProps, DateI
|
|
|
43
43
|
*/
|
|
44
44
|
onChange?: (event: DateInputChangeEvent<T>) => void;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
/** @hidden */
|
|
47
|
+
export declare class DateInputWithoutContext extends React.Component<DateInputProps, {
|
|
47
48
|
focused: boolean;
|
|
48
49
|
}> implements FormComponent {
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
static displayName: string;
|
|
49
54
|
/**
|
|
50
55
|
* @hidden
|
|
51
56
|
*/
|
|
@@ -68,7 +73,7 @@ export declare class DateInput extends React.Component<DateInputProps, {
|
|
|
68
73
|
second: PropTypes.Requireable<string>;
|
|
69
74
|
timeZoneName: PropTypes.Requireable<string>;
|
|
70
75
|
}>>;
|
|
71
|
-
formatPlaceholder: PropTypes.Requireable<
|
|
76
|
+
formatPlaceholder: PropTypes.Requireable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
72
77
|
year: PropTypes.Requireable<string>;
|
|
73
78
|
month: PropTypes.Requireable<string>;
|
|
74
79
|
day: PropTypes.Requireable<string>;
|
|
@@ -97,7 +102,7 @@ export declare class DateInput extends React.Component<DateInputProps, {
|
|
|
97
102
|
id: PropTypes.Requireable<string>;
|
|
98
103
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
99
104
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
100
|
-
ariaExpanded: PropTypes.Requireable<
|
|
105
|
+
ariaExpanded: PropTypes.Requireable<boolean>;
|
|
101
106
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
102
107
|
validationMessage: PropTypes.Requireable<string>;
|
|
103
108
|
required: PropTypes.Requireable<boolean>;
|
|
@@ -240,3 +245,40 @@ export declare class DateInput extends React.Component<DateInputProps, {
|
|
|
240
245
|
private switchDateSegment;
|
|
241
246
|
private modifyDateSegmentValue;
|
|
242
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Represents the PropsContext of the `DateInput` component.
|
|
250
|
+
* Used for global configuration of all `DateInput` instances.
|
|
251
|
+
*
|
|
252
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
253
|
+
*/
|
|
254
|
+
export declare const DateInputPropsContext: React.Context<(p: DateInputProps<any>) => DateInputProps<any>>;
|
|
255
|
+
/**
|
|
256
|
+
* Represent the `ref` of the DateInput component.
|
|
257
|
+
*/
|
|
258
|
+
export interface DateInputHandle extends Pick<DateInputWithoutContext, keyof DateInputWithoutContext> {
|
|
259
|
+
/**
|
|
260
|
+
* Returns the HTML element of the DateInput component.
|
|
261
|
+
*/
|
|
262
|
+
element: HTMLInputElement | null;
|
|
263
|
+
/**
|
|
264
|
+
* Gets the `name` property of the DateInput.
|
|
265
|
+
*/
|
|
266
|
+
name: string | undefined;
|
|
267
|
+
/**
|
|
268
|
+
* Returns the `value` of the DateInput component.
|
|
269
|
+
*/
|
|
270
|
+
value: Date | null;
|
|
271
|
+
/**
|
|
272
|
+
* Represents the validity state into which the DateInput is set.
|
|
273
|
+
*/
|
|
274
|
+
validity: FormComponentValidity;
|
|
275
|
+
}
|
|
276
|
+
/** @hidden */
|
|
277
|
+
export declare type DateInput = DateInputHandle;
|
|
278
|
+
/**
|
|
279
|
+
* Represents the KendoReact DateInput Component.
|
|
280
|
+
*
|
|
281
|
+
* Accepts properties of type [DateInputProps]({% slug api_dateinputs_dateinputprops %}).
|
|
282
|
+
* Obtaining the `ref` returns an object of type [DateInputHandle]({% slug api_dateinputs_dateinputhandle %}).
|
|
283
|
+
*/
|
|
284
|
+
export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps<any> & React.RefAttributes<any>>;
|