@progress/kendo-react-dateinputs 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230
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/PopupSettings.js +1 -0
- package/dist/es/calendar/components/Calendar.d.ts +10 -10
- package/dist/es/calendar/components/Calendar.js +26 -12
- package/dist/es/calendar/components/CalendarCell.js +7 -3
- package/dist/es/calendar/components/CalendarHeaderTitle.js +7 -3
- package/dist/es/calendar/components/CalendarNavigationItem.js +7 -3
- package/dist/es/calendar/components/CalendarWeekCell.js +7 -3
- package/dist/es/calendar/components/Header.d.ts +5 -4
- package/dist/es/calendar/components/Header.js +8 -6
- package/dist/es/calendar/components/HorizontalViewList.d.ts +4 -4
- package/dist/es/calendar/components/HorizontalViewList.js +8 -5
- package/dist/es/calendar/components/MultiViewCalendar.d.ts +13 -13
- package/dist/es/calendar/components/MultiViewCalendar.js +24 -15
- package/dist/es/calendar/components/Navigation.d.ts +2 -2
- package/dist/es/calendar/components/Navigation.js +13 -6
- package/dist/es/calendar/components/TodayCommand.d.ts +3 -3
- package/dist/es/calendar/components/TodayCommand.js +10 -6
- package/dist/es/calendar/components/View.d.ts +11 -11
- package/dist/es/calendar/components/View.js +17 -13
- package/dist/es/calendar/components/ViewList.d.ts +9 -9
- package/dist/es/calendar/components/ViewList.js +19 -9
- package/dist/es/calendar/models/ActiveView.js +1 -0
- package/dist/es/calendar/models/CalendarSettings.js +1 -0
- package/dist/es/calendar/models/CellContext.js +1 -0
- package/dist/es/calendar/models/MultiViewCalendarMode.js +1 -0
- package/dist/es/calendar/models/MultiViewCalendarSettings.js +1 -0
- package/dist/es/calendar/models/SelectionRangeEnd.js +1 -0
- package/dist/es/calendar/models/ViewService.js +1 -0
- package/dist/es/calendar/services/BusViewService.js +1 -1
- package/dist/es/calendar/services/CenturyViewService.js +2 -2
- package/dist/es/calendar/services/DOMService.js +24 -6
- package/dist/es/calendar/services/DecadeViewService.js +2 -2
- package/dist/es/calendar/services/MonthViewService.js +2 -2
- package/dist/es/calendar/services/NavigationService.js +1 -1
- package/dist/es/calendar/services/ScrollSyncService.js +5 -1
- package/dist/es/calendar/services/YearViewService.js +2 -2
- package/dist/es/calendar/utils/ScrollSync.d.ts +3 -3
- package/dist/es/calendar/utils/ScrollSync.js +2 -0
- package/dist/es/dateinput/DateInput.d.ts +24 -20
- package/dist/es/dateinput/DateInput.js +32 -19
- package/dist/es/dateinput/models/DateInputSettings.js +1 -0
- package/dist/es/dateinput/models/format-placeholder.js +1 -0
- package/dist/es/dateinput/models/incremental-steps.js +1 -0
- package/dist/es/dateinput/models/kendo-date.d.ts +2 -2
- package/dist/es/dateinput/models/kendo-date.js +3 -3
- package/dist/es/dateinput/models/mask.js +1 -0
- package/dist/es/dateinput/models/selection.js +1 -0
- package/dist/es/dateinput/utils.d.ts +2 -2
- package/dist/es/datepicker/DatePicker.d.ts +25 -25
- package/dist/es/datepicker/DatePicker.js +28 -23
- package/dist/es/datepicker/models/DatePickerSettings.js +1 -0
- package/dist/es/datepicker/models/index.js +1 -0
- package/dist/es/daterangepicker/DateRangePicker.d.ts +16 -14
- package/dist/es/daterangepicker/DateRangePicker.js +16 -14
- package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.js +1 -0
- package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.js +1 -0
- package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.js +1 -0
- package/dist/es/daterangepicker/models/DateRangePickerSettings.js +1 -0
- package/dist/es/daterangepicker/models/index.js +1 -0
- package/dist/es/datetimepicker/DateTimePicker.d.ts +19 -19
- package/dist/es/datetimepicker/DateTimePicker.js +33 -18
- package/dist/es/datetimepicker/DateTimeSelector.d.ts +7 -7
- package/dist/es/datetimepicker/DateTimeSelector.js +17 -7
- package/dist/es/datetimepicker/models/DateTimePickerSettings.js +1 -0
- package/dist/es/datetimepicker/models/index.js +1 -0
- package/dist/es/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/es/messages/index.d.ts +21 -21
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimeList.d.ts +8 -8
- package/dist/es/timepicker/TimeList.js +33 -13
- package/dist/es/timepicker/TimePart.d.ts +11 -11
- package/dist/es/timepicker/TimePart.js +14 -9
- package/dist/es/timepicker/TimePicker.d.ts +23 -23
- package/dist/es/timepicker/TimePicker.js +27 -22
- package/dist/es/timepicker/TimeSelector.d.ts +6 -6
- package/dist/es/timepicker/TimeSelector.js +11 -5
- package/dist/es/timepicker/models/IncrementalSteps.js +1 -0
- package/dist/es/timepicker/models/ListItem.js +1 -0
- package/dist/es/timepicker/models/ListService.js +1 -0
- package/dist/es/timepicker/models/ListServiceSettings.js +1 -0
- package/dist/es/timepicker/models/TimePickerSettings.js +1 -0
- package/dist/es/timepicker/services/DOMService.js +2 -0
- package/dist/es/timepicker/services/DayPeriodService.js +9 -3
- package/dist/es/timepicker/services/HoursService.js +14 -5
- package/dist/es/timepicker/services/MinutesService.js +12 -6
- package/dist/es/timepicker/services/SecondsService.js +12 -6
- package/dist/es/timepicker/utils.d.ts +4 -4
- package/dist/es/utils.d.ts +1 -1
- package/dist/es/utils.js +10 -1
- package/dist/es/virtualization/Virtualization.d.ts +9 -8
- package/dist/es/virtualization/Virtualization.js +23 -13
- package/dist/es/virtualization/services/RowHeightService.js +10 -1
- package/dist/es/virtualization/services/ScrollerService.js +9 -3
- package/dist/npm/calendar/components/Calendar.d.ts +10 -10
- package/dist/npm/calendar/components/Calendar.js +53 -38
- package/dist/npm/calendar/components/CalendarCell.js +9 -4
- package/dist/npm/calendar/components/CalendarHeaderTitle.js +8 -3
- package/dist/npm/calendar/components/CalendarNavigationItem.js +9 -4
- package/dist/npm/calendar/components/CalendarWeekCell.js +9 -4
- package/dist/npm/calendar/components/Header.d.ts +5 -4
- package/dist/npm/calendar/components/Header.js +11 -8
- package/dist/npm/calendar/components/HorizontalViewList.d.ts +4 -4
- package/dist/npm/calendar/components/HorizontalViewList.js +11 -7
- package/dist/npm/calendar/components/MultiViewCalendar.d.ts +13 -13
- package/dist/npm/calendar/components/MultiViewCalendar.js +62 -52
- package/dist/npm/calendar/components/Navigation.d.ts +2 -2
- package/dist/npm/calendar/components/Navigation.js +18 -10
- package/dist/npm/calendar/components/TodayCommand.d.ts +3 -3
- package/dist/npm/calendar/components/TodayCommand.js +16 -11
- package/dist/npm/calendar/components/View.d.ts +11 -11
- package/dist/npm/calendar/components/View.js +27 -22
- package/dist/npm/calendar/components/ViewList.d.ts +9 -9
- package/dist/npm/calendar/components/ViewList.js +29 -18
- package/dist/npm/calendar/models/CalendarViewEnum.js +1 -0
- package/dist/npm/calendar/models/NavigationAction.js +1 -0
- package/dist/npm/calendar/models/SelectionRange.js +1 -0
- package/dist/npm/calendar/models/index.js +4 -3
- package/dist/npm/calendar/services/BusViewService.js +3 -2
- package/dist/npm/calendar/services/CenturyViewService.js +40 -39
- package/dist/npm/calendar/services/DOMService.js +34 -15
- package/dist/npm/calendar/services/DecadeViewService.js +34 -33
- package/dist/npm/calendar/services/MonthViewService.js +38 -37
- package/dist/npm/calendar/services/NavigationService.js +2 -1
- package/dist/npm/calendar/services/ScrollSyncService.js +6 -1
- package/dist/npm/calendar/services/WeekNamesService.js +2 -1
- package/dist/npm/calendar/services/YearViewService.js +35 -34
- package/dist/npm/calendar/services/index.js +10 -9
- package/dist/npm/calendar/utils/ScrollSync.d.ts +3 -3
- package/dist/npm/calendar/utils/ScrollSync.js +2 -0
- package/dist/npm/common/PickerWrap.js +2 -1
- package/dist/npm/dateinput/DateInput.d.ts +24 -20
- package/dist/npm/dateinput/DateInput.js +51 -37
- package/dist/npm/dateinput/models/index.js +3 -2
- package/dist/npm/dateinput/models/kendo-date.d.ts +2 -2
- package/dist/npm/dateinput/models/kendo-date.js +15 -14
- package/dist/npm/dateinput/models/mask.js +2 -0
- package/dist/npm/dateinput/utils.d.ts +2 -2
- package/dist/npm/dateinput/utils.js +9 -4
- package/dist/npm/datepicker/DatePicker.d.ts +25 -25
- package/dist/npm/datepicker/DatePicker.js +42 -36
- package/dist/npm/datepicker/ToggleButton.js +1 -0
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +16 -14
- package/dist/npm/daterangepicker/DateRangePicker.js +34 -31
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +19 -19
- package/dist/npm/datetimepicker/DateTimePicker.js +46 -30
- package/dist/npm/datetimepicker/DateTimeSelector.d.ts +7 -7
- package/dist/npm/datetimepicker/DateTimeSelector.js +26 -15
- package/dist/npm/defaults.js +1 -0
- package/dist/npm/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/npm/hooks/usePickerFloatingLabel.js +6 -3
- package/dist/npm/main.js +22 -21
- package/dist/npm/messages/index.d.ts +21 -21
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/timepicker/TimeList.d.ts +8 -8
- package/dist/npm/timepicker/TimeList.js +39 -18
- package/dist/npm/timepicker/TimePart.d.ts +11 -11
- package/dist/npm/timepicker/TimePart.js +25 -19
- package/dist/npm/timepicker/TimePicker.d.ts +23 -23
- package/dist/npm/timepicker/TimePicker.js +43 -37
- package/dist/npm/timepicker/TimeSelector.d.ts +6 -6
- package/dist/npm/timepicker/TimeSelector.js +22 -15
- package/dist/npm/timepicker/models/TimePart.js +1 -0
- package/dist/npm/timepicker/models/index.js +2 -1
- package/dist/npm/timepicker/services/DOMService.js +7 -4
- package/dist/npm/timepicker/services/DayPeriodService.js +11 -4
- package/dist/npm/timepicker/services/HoursService.js +21 -11
- package/dist/npm/timepicker/services/MinutesService.js +17 -10
- package/dist/npm/timepicker/services/SecondsService.js +17 -10
- package/dist/npm/timepicker/services/index.js +6 -5
- package/dist/npm/timepicker/utils.d.ts +4 -4
- package/dist/npm/timepicker/utils.js +30 -20
- package/dist/npm/utils.d.ts +1 -1
- package/dist/npm/utils.js +43 -20
- package/dist/npm/virtualization/Virtualization.d.ts +9 -8
- package/dist/npm/virtualization/Virtualization.js +27 -16
- package/dist/npm/virtualization/services/RowHeightService.js +11 -1
- package/dist/npm/virtualization/services/ScrollerService.js +10 -3
- package/dist/npm/virtualization/services/index.js +5 -4
- package/dist/systemjs/kendo-react-dateinputs.js +1 -1
- package/package.json +13 -13
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YearViewService = exports.WeekNamesService = exports.ScrollSyncService = exports.NavigationService = exports.MonthViewService = exports.DOMService = exports.DecadeViewService = exports.CenturyViewService = exports.BusViewService = void 0;
|
|
3
4
|
var BusViewService_1 = require("./BusViewService");
|
|
4
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "BusViewService", { enumerable: true, get: function () { return BusViewService_1.BusViewService; } });
|
|
5
6
|
var CenturyViewService_1 = require("./CenturyViewService");
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "CenturyViewService", { enumerable: true, get: function () { return CenturyViewService_1.CenturyViewService; } });
|
|
7
8
|
var DecadeViewService_1 = require("./DecadeViewService");
|
|
8
|
-
exports
|
|
9
|
+
Object.defineProperty(exports, "DecadeViewService", { enumerable: true, get: function () { return DecadeViewService_1.DecadeViewService; } });
|
|
9
10
|
var DOMService_1 = require("./DOMService");
|
|
10
|
-
exports
|
|
11
|
+
Object.defineProperty(exports, "DOMService", { enumerable: true, get: function () { return DOMService_1.DOMService; } });
|
|
11
12
|
var MonthViewService_1 = require("./MonthViewService");
|
|
12
|
-
exports
|
|
13
|
+
Object.defineProperty(exports, "MonthViewService", { enumerable: true, get: function () { return MonthViewService_1.MonthViewService; } });
|
|
13
14
|
var NavigationService_1 = require("./NavigationService");
|
|
14
|
-
exports
|
|
15
|
+
Object.defineProperty(exports, "NavigationService", { enumerable: true, get: function () { return NavigationService_1.NavigationService; } });
|
|
15
16
|
var ScrollSyncService_1 = require("./ScrollSyncService");
|
|
16
|
-
exports
|
|
17
|
+
Object.defineProperty(exports, "ScrollSyncService", { enumerable: true, get: function () { return ScrollSyncService_1.ScrollSyncService; } });
|
|
17
18
|
var WeekNamesService_1 = require("./WeekNamesService");
|
|
18
|
-
exports
|
|
19
|
+
Object.defineProperty(exports, "WeekNamesService", { enumerable: true, get: function () { return WeekNamesService_1.WeekNamesService; } });
|
|
19
20
|
var YearViewService_1 = require("./YearViewService");
|
|
20
|
-
exports
|
|
21
|
+
Object.defineProperty(exports, "YearViewService", { enumerable: true, get: function () { return YearViewService_1.YearViewService; } });
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
export default class ScrollSync {
|
|
5
5
|
private scrollDetails;
|
|
6
6
|
private scrollNavigation;
|
|
7
|
-
areDetailsSynced:
|
|
8
|
-
isNavigationSynced:
|
|
9
|
-
magnitude:
|
|
7
|
+
areDetailsSynced: boolean;
|
|
8
|
+
isNavigationSynced: boolean;
|
|
9
|
+
magnitude: number;
|
|
10
10
|
constructor(detailsMonthHeight: number, navigationMonthHeight: number, scrollDetails: (scrollTo: number) => void, scrollNavigation: (scrollTo: number) => void);
|
|
11
11
|
syncDetails(navigationScrollTop: number): void;
|
|
12
12
|
syncNavigation(detailsScrollTop: number): void;
|
|
@@ -7,6 +7,8 @@ var ScrollSync = /** @class */ (function () {
|
|
|
7
7
|
function ScrollSync(detailsMonthHeight, navigationMonthHeight, scrollDetails, scrollNavigation) {
|
|
8
8
|
this.scrollDetails = scrollDetails;
|
|
9
9
|
this.scrollNavigation = scrollNavigation;
|
|
10
|
+
this.areDetailsSynced = false;
|
|
11
|
+
this.isNavigationSynced = false;
|
|
10
12
|
this.magnitude = Math.max(detailsMonthHeight / navigationMonthHeight, 1);
|
|
11
13
|
}
|
|
12
14
|
ScrollSync.prototype.syncDetails = function (navigationScrollTop) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PickerWrap = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
5
6
|
/**
|
|
@@ -11,6 +12,6 @@ exports.PickerWrap = React.forwardRef(function (props, ref) {
|
|
|
11
12
|
var element = React.useRef(null);
|
|
12
13
|
React.useImperativeHandle(ref, function () { return element.current; });
|
|
13
14
|
React.useImperativeHandle(_ref, function () { return element.current; });
|
|
14
|
-
var className = React.useMemo(function () { return kendo_react_common_1.classNames(props.className, 'k-picker-wrap'); }, [props.className]);
|
|
15
|
+
var className = React.useMemo(function () { return (0, kendo_react_common_1.classNames)(props.className, 'k-picker-wrap'); }, [props.className]);
|
|
15
16
|
return (React.createElement("span", { ref: element, id: props.id, style: props.style, className: className, tabIndex: props.tabIndex }, props.children));
|
|
16
17
|
});
|
|
@@ -18,6 +18,10 @@ export interface DateInputChangeEvent<T = DateInput> {
|
|
|
18
18
|
export interface DateInputProps<T extends DateInput = any> extends FormComponentProps, DateInputSettings {
|
|
19
19
|
/** @hidden */
|
|
20
20
|
_ref?: React.MutableRefObject<DateInput | null>;
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
children?: React.ReactNode;
|
|
21
25
|
/**
|
|
22
26
|
* Sets a class of the DateInput DOM element.
|
|
23
27
|
*/
|
|
@@ -110,7 +114,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
110
114
|
second: PropTypes.Requireable<string>;
|
|
111
115
|
timeZoneName: PropTypes.Requireable<string>;
|
|
112
116
|
}>>;
|
|
113
|
-
formatPlaceholder: PropTypes.Requireable<"
|
|
117
|
+
formatPlaceholder: PropTypes.Requireable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
114
118
|
year: PropTypes.Requireable<string>;
|
|
115
119
|
month: PropTypes.Requireable<string>;
|
|
116
120
|
day: PropTypes.Requireable<string>;
|
|
@@ -146,18 +150,18 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
146
150
|
required: PropTypes.Requireable<boolean>;
|
|
147
151
|
validate: PropTypes.Requireable<boolean>;
|
|
148
152
|
valid: PropTypes.Requireable<boolean>;
|
|
149
|
-
size: PropTypes.Requireable<"small" | "medium" | "large">;
|
|
150
|
-
rounded: PropTypes.Requireable<"small" | "medium" | "
|
|
151
|
-
fillMode: PropTypes.Requireable<"
|
|
153
|
+
size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
|
|
154
|
+
rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
|
|
155
|
+
fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
|
|
152
156
|
};
|
|
153
157
|
/**
|
|
154
158
|
* @hidden
|
|
155
159
|
*/
|
|
156
160
|
static defaultProps: {
|
|
157
161
|
format: string;
|
|
158
|
-
size: "small" | "medium" | "large";
|
|
159
|
-
rounded: "small" | "medium" | "
|
|
160
|
-
fillMode: "
|
|
162
|
+
size: "small" | "medium" | "large" | null | undefined;
|
|
163
|
+
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
164
|
+
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
161
165
|
formatPlaceholder: DateInputFormatPlaceholder;
|
|
162
166
|
spinners: boolean;
|
|
163
167
|
disabled: boolean;
|
|
@@ -168,7 +172,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
168
172
|
required: boolean;
|
|
169
173
|
validityStyles: boolean;
|
|
170
174
|
validationMessage: string;
|
|
171
|
-
placeholder:
|
|
175
|
+
placeholder: null;
|
|
172
176
|
};
|
|
173
177
|
private kendoDate;
|
|
174
178
|
private currentFormat;
|
|
@@ -198,21 +202,21 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
198
202
|
/**
|
|
199
203
|
* Gets the value of the DateInput.
|
|
200
204
|
*/
|
|
201
|
-
|
|
205
|
+
get value(): Date | null;
|
|
202
206
|
/**
|
|
203
207
|
* Gets the `name` property of the DateInput.
|
|
204
208
|
*/
|
|
205
|
-
|
|
206
|
-
protected
|
|
207
|
-
protected
|
|
209
|
+
get name(): string | undefined;
|
|
210
|
+
protected get min(): Date;
|
|
211
|
+
protected get max(): Date;
|
|
208
212
|
/**
|
|
209
213
|
* @hidden
|
|
210
214
|
*/
|
|
211
|
-
|
|
215
|
+
get text(): string;
|
|
212
216
|
/**
|
|
213
217
|
* Represents the validity state into which the DateInput is set.
|
|
214
218
|
*/
|
|
215
|
-
|
|
219
|
+
get validity(): FormComponentValidity;
|
|
216
220
|
/**
|
|
217
221
|
* Gets the element of the DateInput.
|
|
218
222
|
*
|
|
@@ -244,7 +248,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
244
248
|
* );
|
|
245
249
|
* ```
|
|
246
250
|
*/
|
|
247
|
-
|
|
251
|
+
get element(): HTMLInputElement | null;
|
|
248
252
|
/**
|
|
249
253
|
* @hidden
|
|
250
254
|
*/
|
|
@@ -252,15 +256,15 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
252
256
|
/**
|
|
253
257
|
* @hidden
|
|
254
258
|
*/
|
|
255
|
-
protected
|
|
259
|
+
protected get validityStyles(): boolean;
|
|
256
260
|
/**
|
|
257
261
|
* @hidden
|
|
258
262
|
*/
|
|
259
|
-
protected
|
|
263
|
+
protected get required(): boolean;
|
|
260
264
|
/**
|
|
261
265
|
* @hidden
|
|
262
266
|
*/
|
|
263
|
-
protected
|
|
267
|
+
protected get wrapper(): HTMLSpanElement | null;
|
|
264
268
|
/**
|
|
265
269
|
* @hidden
|
|
266
270
|
*/
|
|
@@ -269,7 +273,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
269
273
|
* @hidden
|
|
270
274
|
*/
|
|
271
275
|
protected setValidity: () => void;
|
|
272
|
-
protected updateOnPaste: (event: React.SyntheticEvent<HTMLInputElement
|
|
276
|
+
protected updateOnPaste: (event: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
273
277
|
private spinnersMouseDown;
|
|
274
278
|
private handlePaste;
|
|
275
279
|
private elementChange;
|
|
@@ -281,7 +285,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
281
285
|
private elementKeyDown;
|
|
282
286
|
private elementOnFocus;
|
|
283
287
|
private elementOnBlur;
|
|
284
|
-
private
|
|
288
|
+
private get selection();
|
|
285
289
|
private setSelection;
|
|
286
290
|
private triggerChange;
|
|
287
291
|
private selectionBySymbol;
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -23,7 +25,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
23
25
|
};
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
26
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.DateInput = exports.DateInputPropsContext = exports.DateInputWithoutContext = void 0;
|
|
27
39
|
var React = require("react");
|
|
28
40
|
var PropTypes = require("prop-types");
|
|
29
41
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
@@ -47,10 +59,12 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
47
59
|
function DateInputWithoutContext(props) {
|
|
48
60
|
var _this = _super.call(this, props) || this;
|
|
49
61
|
_this.kendoDate = null;
|
|
62
|
+
_this.currentFormat = '';
|
|
50
63
|
_this.paste = false;
|
|
51
64
|
_this._element = null;
|
|
52
65
|
_this._wrapper = null;
|
|
53
|
-
_this._inputId = kendo_react_common_1.guid();
|
|
66
|
+
_this._inputId = (0, kendo_react_common_1.guid)();
|
|
67
|
+
_this._lastSelectedSymbol = '';
|
|
54
68
|
/**
|
|
55
69
|
* @hidden
|
|
56
70
|
*/
|
|
@@ -73,7 +87,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
73
87
|
if (!_this.element || !_this.kendoDate) {
|
|
74
88
|
return;
|
|
75
89
|
}
|
|
76
|
-
var value = kendo_react_intl_1.provideIntlService(_this).parseDate(_this.element.value, _this.props.format) || _this.value;
|
|
90
|
+
var value = (0, kendo_react_intl_1.provideIntlService)(_this).parseDate(_this.element.value, _this.props.format) || _this.value;
|
|
77
91
|
var oldValue = _this.value;
|
|
78
92
|
_this.kendoDate.setValue(value);
|
|
79
93
|
_this.triggerChange(event, oldValue);
|
|
@@ -102,7 +116,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
102
116
|
var _a = _this.kendoDate.getTextAndFormat(), text = _a.text, currentFormat = _a.format;
|
|
103
117
|
_this.currentFormat = currentFormat;
|
|
104
118
|
var dateBeforeChange = _this.value;
|
|
105
|
-
var diff = utils_1.approximateStringMatching(text, _this.currentFormat, _this.element.value, _this.selection.start);
|
|
119
|
+
var diff = (0, utils_1.approximateStringMatching)(text, _this.currentFormat, _this.element.value, _this.selection.start);
|
|
106
120
|
var navigationOnly = (diff.length === 1 && diff[0][1] === '_');
|
|
107
121
|
if (!navigationOnly) {
|
|
108
122
|
for (var i = 0; i < diff.length; i++) {
|
|
@@ -195,7 +209,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
195
209
|
}
|
|
196
210
|
_this.setState({ focused: false });
|
|
197
211
|
};
|
|
198
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
212
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
199
213
|
_this.state = {
|
|
200
214
|
focused: false
|
|
201
215
|
};
|
|
@@ -239,8 +253,8 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
239
253
|
if (this.props._ref) {
|
|
240
254
|
this.props._ref.current = this;
|
|
241
255
|
}
|
|
242
|
-
var localizationService = kendo_react_intl_1.provideLocalizationService(this);
|
|
243
|
-
var props = __assign({}, DateInputWithoutContext.defaultProps, this.props);
|
|
256
|
+
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
257
|
+
var props = __assign(__assign({}, DateInputWithoutContext.defaultProps), this.props);
|
|
244
258
|
var min = props.min, max = props.max, name = props.name, label = props.label, id = props.id;
|
|
245
259
|
var currentText = this.text;
|
|
246
260
|
var text = currentText === this.props.placeholder ? '' : currentText;
|
|
@@ -255,19 +269,19 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
255
269
|
if (this.value !== null) {
|
|
256
270
|
ariaProps['aria-valuenow'] = this.value.getTime();
|
|
257
271
|
}
|
|
258
|
-
var wrapperClassesInstance = utils_1.wrapperClasses
|
|
272
|
+
var wrapperClassesInstance = __spreadArray([], utils_1.wrapperClasses, true);
|
|
259
273
|
if (this.props.className) {
|
|
260
274
|
wrapperClassesInstance.push(this.props.className);
|
|
261
275
|
}
|
|
262
276
|
var dateinput = (React.createElement(kendo_react_common_1.AsyncFocusBlur, { onFocus: this.elementOnFocus, onBlur: this.elementOnBlur }, function (_a) {
|
|
263
|
-
var onFocus = _a.onFocus, onBlur = _a.onBlur;
|
|
264
277
|
var _b;
|
|
278
|
+
var onFocus = _a.onFocus, onBlur = _a.onBlur;
|
|
265
279
|
return (React.createElement("span", { ref: function (span) { _this._wrapper = span; }, style: !label
|
|
266
280
|
? { width: _this.props.width }
|
|
267
|
-
: undefined, dir: _this.props.dir, className: kendo_react_common_1.classNames('k-dateinput', 'k-input', (_b = {},
|
|
268
|
-
_b["k-input-"
|
|
269
|
-
_b["k-input-"
|
|
270
|
-
_b["k-rounded-"
|
|
281
|
+
: undefined, dir: _this.props.dir, className: (0, kendo_react_common_1.classNames)('k-dateinput', 'k-input', (_b = {},
|
|
282
|
+
_b["k-input-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
283
|
+
_b["k-input-".concat(fillMode)] = fillMode,
|
|
284
|
+
_b["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
271
285
|
_b['k-invalid'] = !isValid,
|
|
272
286
|
_b['k-required'] = _this.required,
|
|
273
287
|
_b['k-disabled'] = _this.props.disabled,
|
|
@@ -293,7 +307,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
293
307
|
}
|
|
294
308
|
return this.kendoDate && this.kendoDate.getDateObject();
|
|
295
309
|
},
|
|
296
|
-
enumerable:
|
|
310
|
+
enumerable: false,
|
|
297
311
|
configurable: true
|
|
298
312
|
});
|
|
299
313
|
Object.defineProperty(DateInputWithoutContext.prototype, "name", {
|
|
@@ -303,7 +317,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
303
317
|
get: function () {
|
|
304
318
|
return this.props.name;
|
|
305
319
|
},
|
|
306
|
-
enumerable:
|
|
320
|
+
enumerable: false,
|
|
307
321
|
configurable: true
|
|
308
322
|
});
|
|
309
323
|
Object.defineProperty(DateInputWithoutContext.prototype, "min", {
|
|
@@ -312,7 +326,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
312
326
|
? this.props.min
|
|
313
327
|
: DateInputWithoutContext.defaultProps.min;
|
|
314
328
|
},
|
|
315
|
-
enumerable:
|
|
329
|
+
enumerable: false,
|
|
316
330
|
configurable: true
|
|
317
331
|
});
|
|
318
332
|
Object.defineProperty(DateInputWithoutContext.prototype, "max", {
|
|
@@ -321,7 +335,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
321
335
|
? this.props.max
|
|
322
336
|
: DateInputWithoutContext.defaultProps.max;
|
|
323
337
|
},
|
|
324
|
-
enumerable:
|
|
338
|
+
enumerable: false,
|
|
325
339
|
configurable: true
|
|
326
340
|
});
|
|
327
341
|
Object.defineProperty(DateInputWithoutContext.prototype, "text", {
|
|
@@ -329,7 +343,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
329
343
|
* @hidden
|
|
330
344
|
*/
|
|
331
345
|
get: function () {
|
|
332
|
-
var props = __assign({}, exports.DateInput.defaultProps, this.props);
|
|
346
|
+
var props = __assign(__assign({}, exports.DateInput.defaultProps), this.props);
|
|
333
347
|
var _a = props.formatPlaceholder, formatPlaceholder = _a === void 0 ? DateInputWithoutContext.defaultProps.formatPlaceholder : _a, _b = props.format, format = _b === void 0 ? DateInputWithoutContext.defaultProps.format : _b, value = props.value, defaultValue = props.defaultValue;
|
|
334
348
|
if (this.kendoDate === null) {
|
|
335
349
|
this.kendoDate = new models_1.KendoDate(this.intl.bind(this), formatPlaceholder, format);
|
|
@@ -350,7 +364,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
350
364
|
? props.placeholder
|
|
351
365
|
: currentText;
|
|
352
366
|
},
|
|
353
|
-
enumerable:
|
|
367
|
+
enumerable: false,
|
|
354
368
|
configurable: true
|
|
355
369
|
});
|
|
356
370
|
Object.defineProperty(DateInputWithoutContext.prototype, "validity", {
|
|
@@ -358,8 +372,8 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
358
372
|
* Represents the validity state into which the DateInput is set.
|
|
359
373
|
*/
|
|
360
374
|
get: function () {
|
|
361
|
-
var inRange = utils_1.isInRange(this.value, this.min, this.max)
|
|
362
|
-
&& utils_3.isInTimeRange(this.value, this.props.minTime, this.props.maxTime);
|
|
375
|
+
var inRange = (0, utils_1.isInRange)(this.value, this.min, this.max)
|
|
376
|
+
&& (0, utils_3.isInTimeRange)(this.value, this.props.minTime, this.props.maxTime);
|
|
363
377
|
var customError = this.props.validationMessage !== undefined;
|
|
364
378
|
var isValid = (!this.required || this.value !== null) && inRange;
|
|
365
379
|
var valid = this.props.valid !== undefined ? this.props.valid : isValid;
|
|
@@ -371,7 +385,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
371
385
|
valueMissing: this.value === null
|
|
372
386
|
};
|
|
373
387
|
},
|
|
374
|
-
enumerable:
|
|
388
|
+
enumerable: false,
|
|
375
389
|
configurable: true
|
|
376
390
|
});
|
|
377
391
|
Object.defineProperty(DateInputWithoutContext.prototype, "element", {
|
|
@@ -409,7 +423,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
409
423
|
get: function () {
|
|
410
424
|
return this._element;
|
|
411
425
|
},
|
|
412
|
-
enumerable:
|
|
426
|
+
enumerable: false,
|
|
413
427
|
configurable: true
|
|
414
428
|
});
|
|
415
429
|
Object.defineProperty(DateInputWithoutContext.prototype, "validityStyles", {
|
|
@@ -421,7 +435,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
421
435
|
? this.props.validityStyles
|
|
422
436
|
: DateInputWithoutContext.defaultProps.validityStyles;
|
|
423
437
|
},
|
|
424
|
-
enumerable:
|
|
438
|
+
enumerable: false,
|
|
425
439
|
configurable: true
|
|
426
440
|
});
|
|
427
441
|
Object.defineProperty(DateInputWithoutContext.prototype, "required", {
|
|
@@ -433,7 +447,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
433
447
|
? this.props.required
|
|
434
448
|
: DateInputWithoutContext.defaultProps.required;
|
|
435
449
|
},
|
|
436
|
-
enumerable:
|
|
450
|
+
enumerable: false,
|
|
437
451
|
configurable: true
|
|
438
452
|
});
|
|
439
453
|
Object.defineProperty(DateInputWithoutContext.prototype, "wrapper", {
|
|
@@ -443,14 +457,14 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
443
457
|
get: function () {
|
|
444
458
|
return this._wrapper;
|
|
445
459
|
},
|
|
446
|
-
enumerable:
|
|
460
|
+
enumerable: false,
|
|
447
461
|
configurable: true
|
|
448
462
|
});
|
|
449
463
|
/**
|
|
450
464
|
* @hidden
|
|
451
465
|
*/
|
|
452
466
|
DateInputWithoutContext.prototype.intl = function () {
|
|
453
|
-
return kendo_react_intl_1.provideIntlService(this);
|
|
467
|
+
return (0, kendo_react_intl_1.provideIntlService)(this);
|
|
454
468
|
};
|
|
455
469
|
Object.defineProperty(DateInputWithoutContext.prototype, "selection", {
|
|
456
470
|
/* end handlers */
|
|
@@ -461,7 +475,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
461
475
|
}
|
|
462
476
|
return returnValue;
|
|
463
477
|
},
|
|
464
|
-
enumerable:
|
|
478
|
+
enumerable: false,
|
|
465
479
|
configurable: true
|
|
466
480
|
});
|
|
467
481
|
DateInputWithoutContext.prototype.setSelection = function (selection) {
|
|
@@ -477,7 +491,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
477
491
|
this.valueDuringOnChange = this.value;
|
|
478
492
|
this.forceUpdate();
|
|
479
493
|
if (this.props.onChange
|
|
480
|
-
&& !kendo_date_math_1.isEqual(oldValue, this.value)) {
|
|
494
|
+
&& !(0, kendo_date_math_1.isEqual)(oldValue, this.value)) {
|
|
481
495
|
// isEqual works with null
|
|
482
496
|
this.props.onChange.call(undefined, {
|
|
483
497
|
syntheticEvent: event,
|
|
@@ -653,10 +667,10 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
653
667
|
// defaultValue: null as Date | null,
|
|
654
668
|
spinners: false,
|
|
655
669
|
disabled: false,
|
|
656
|
-
max: kendo_date_math_1.cloneDate(utils_2.MAX_DATE),
|
|
657
|
-
min: kendo_date_math_1.cloneDate(utils_2.MIN_DATE),
|
|
658
|
-
minTime: kendo_date_math_1.cloneDate(defaults_1.MIN_TIME),
|
|
659
|
-
maxTime: kendo_date_math_1.cloneDate(defaults_1.MAX_TIME),
|
|
670
|
+
max: (0, kendo_date_math_1.cloneDate)(utils_2.MAX_DATE),
|
|
671
|
+
min: (0, kendo_date_math_1.cloneDate)(utils_2.MIN_DATE),
|
|
672
|
+
minTime: (0, kendo_date_math_1.cloneDate)(defaults_1.MIN_TIME),
|
|
673
|
+
maxTime: (0, kendo_date_math_1.cloneDate)(defaults_1.MAX_TIME),
|
|
660
674
|
required: false,
|
|
661
675
|
validityStyles: true,
|
|
662
676
|
validationMessage: VALIDATION_MESSAGE,
|
|
@@ -672,7 +686,7 @@ exports.DateInputWithoutContext = DateInputWithoutContext;
|
|
|
672
686
|
*
|
|
673
687
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
674
688
|
*/
|
|
675
|
-
exports.DateInputPropsContext = kendo_react_common_1.createPropsContext();
|
|
689
|
+
exports.DateInputPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
676
690
|
;
|
|
677
691
|
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
678
692
|
/**
|
|
@@ -681,7 +695,7 @@ exports.DateInputPropsContext = kendo_react_common_1.createPropsContext();
|
|
|
681
695
|
* Accepts properties of type [DateInputProps]({% slug api_dateinputs_dateinputprops %}).
|
|
682
696
|
* Obtaining the `ref` returns an object of type [DateInputHandle]({% slug api_dateinputs_dateinputhandle %}).
|
|
683
697
|
*/
|
|
684
|
-
exports.DateInput = kendo_react_common_1.withPropsContext(exports.DateInputPropsContext, DateInputWithoutContext);
|
|
698
|
+
exports.DateInput = (0, kendo_react_common_1.withPropsContext)(exports.DateInputPropsContext, DateInputWithoutContext);
|
|
685
699
|
exports.DateInput.displayName = 'KendoReactDateInput';
|
|
686
|
-
kendo_react_intl_1.registerForIntl(DateInputWithoutContext);
|
|
687
|
-
kendo_react_intl_1.registerForLocalization(DateInputWithoutContext);
|
|
700
|
+
(0, kendo_react_intl_1.registerForIntl)(DateInputWithoutContext);
|
|
701
|
+
(0, kendo_react_intl_1.registerForLocalization)(DateInputWithoutContext);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Mask = exports.KendoDate = void 0;
|
|
3
4
|
var kendo_date_1 = require("./kendo-date");
|
|
4
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "KendoDate", { enumerable: true, get: function () { return kendo_date_1.KendoDate; } });
|
|
5
6
|
var mask_1 = require("./mask");
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "Mask", { enumerable: true, get: function () { return mask_1.Mask; } });
|
|
@@ -25,9 +25,9 @@ export declare class KendoDate {
|
|
|
25
25
|
private knownParts;
|
|
26
26
|
private symbols;
|
|
27
27
|
private intlProvider;
|
|
28
|
-
|
|
28
|
+
get intl(): IntlService;
|
|
29
29
|
private _value;
|
|
30
|
-
|
|
30
|
+
get value(): Date;
|
|
31
31
|
constructor(intlProvider: () => IntlService, formatPlaceholder: DateInputFormatPlaceholder, format: string | DateFormatOptions);
|
|
32
32
|
setValue(value: Date | null): void;
|
|
33
33
|
hasValue(): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KendoDate = void 0;
|
|
3
4
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
4
5
|
var mask_1 = require("./mask");
|
|
5
6
|
var utils_1 = require("./../utils");
|
|
@@ -29,7 +30,7 @@ var KendoDate = /** @class */ (function () {
|
|
|
29
30
|
's': 's',
|
|
30
31
|
'y': 'y'
|
|
31
32
|
};
|
|
32
|
-
this._value = kendo_date_math_1.getDate(new Date());
|
|
33
|
+
this._value = (0, kendo_date_math_1.getDate)(new Date());
|
|
33
34
|
this.intlProvider = intlProvider;
|
|
34
35
|
this.formatPlaceholder = formatPlaceholder;
|
|
35
36
|
this.format = format;
|
|
@@ -39,23 +40,23 @@ var KendoDate = /** @class */ (function () {
|
|
|
39
40
|
get: function () {
|
|
40
41
|
return this.intlProvider();
|
|
41
42
|
},
|
|
42
|
-
enumerable:
|
|
43
|
+
enumerable: false,
|
|
43
44
|
configurable: true
|
|
44
45
|
});
|
|
45
46
|
Object.defineProperty(KendoDate.prototype, "value", {
|
|
46
47
|
get: function () {
|
|
47
48
|
return this._value;
|
|
48
49
|
},
|
|
49
|
-
enumerable:
|
|
50
|
+
enumerable: false,
|
|
50
51
|
configurable: true
|
|
51
52
|
});
|
|
52
53
|
KendoDate.prototype.setValue = function (value) {
|
|
53
54
|
if (!value) {
|
|
54
|
-
this._value = kendo_date_math_1.getDate(new Date());
|
|
55
|
+
this._value = (0, kendo_date_math_1.getDate)(new Date());
|
|
55
56
|
this.modifyExisting(false);
|
|
56
57
|
}
|
|
57
|
-
else if (!kendo_date_math_1.isEqual(value, this._value)) {
|
|
58
|
-
this._value = kendo_date_math_1.cloneDate(value);
|
|
58
|
+
else if (!(0, kendo_date_math_1.isEqual)(value, this._value)) {
|
|
59
|
+
this._value = (0, kendo_date_math_1.cloneDate)(value);
|
|
59
60
|
this.modifyExisting(true);
|
|
60
61
|
}
|
|
61
62
|
};
|
|
@@ -70,7 +71,7 @@ var KendoDate = /** @class */ (function () {
|
|
|
70
71
|
return null;
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
return kendo_date_math_1.cloneDate(this.value);
|
|
74
|
+
return (0, kendo_date_math_1.cloneDate)(this.value);
|
|
74
75
|
};
|
|
75
76
|
KendoDate.prototype.getTextAndFormat = function () {
|
|
76
77
|
return this.merge(this.intl.formatDate(this.value, this.format), this.dateFormatString(this.value, this.format));
|
|
@@ -128,13 +129,13 @@ var KendoDate = /** @class */ (function () {
|
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
131
|
KendoDate.prototype.modifyPart = function (symbol, offset) {
|
|
131
|
-
var newValue = kendo_date_math_1.cloneDate(this.value);
|
|
132
|
+
var newValue = (0, kendo_date_math_1.cloneDate)(this.value);
|
|
132
133
|
switch (symbol) {
|
|
133
134
|
case 'y':
|
|
134
135
|
newValue.setFullYear(newValue.getFullYear() + offset);
|
|
135
136
|
break;
|
|
136
137
|
case 'M':
|
|
137
|
-
newValue = kendo_date_math_1.addMonths(this.value, offset);
|
|
138
|
+
newValue = (0, kendo_date_math_1.addMonths)(this.value, offset);
|
|
138
139
|
break;
|
|
139
140
|
case 'd':
|
|
140
141
|
case 'E':
|
|
@@ -200,17 +201,17 @@ var KendoDate = /** @class */ (function () {
|
|
|
200
201
|
if (symbol === 'M' && !month) {
|
|
201
202
|
var monthNumber = middleNumber - 1;
|
|
202
203
|
if (monthNumber > -1 && monthNumber < 12) {
|
|
203
|
-
parsedDate = kendo_date_math_1.cloneDate(this.value);
|
|
204
|
+
parsedDate = (0, kendo_date_math_1.cloneDate)(this.value);
|
|
204
205
|
parsedDate.setMonth(monthNumber);
|
|
205
206
|
if (parsedDate.getMonth() !== monthNumber) {
|
|
206
|
-
parsedDate = kendo_date_math_1.lastDayOfMonth(kendo_date_math_1.addMonths(parsedDate, -1));
|
|
207
|
+
parsedDate = (0, kendo_date_math_1.lastDayOfMonth)((0, kendo_date_math_1.addMonths)(parsedDate, -1));
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
if (symbol === 'y') {
|
|
211
|
-
parsedDate = kendo_date_math_1.createDate(parseInt(middle, 10), this.month ? this.value.getMonth() : 0, this.date ? this.value.getDate() : 1, this.hours ? this.value.getHours() : 0, this.minutes ? this.value.getMinutes() : 0, this.seconds ? this.value.getSeconds() : 0, this.milliseconds ? this.value.getMilliseconds() : 0);
|
|
212
|
+
parsedDate = (0, kendo_date_math_1.createDate)(parseInt(middle, 10), this.month ? this.value.getMonth() : 0, this.date ? this.value.getDate() : 1, this.hours ? this.value.getHours() : 0, this.minutes ? this.value.getMinutes() : 0, this.seconds ? this.value.getSeconds() : 0, this.milliseconds ? this.value.getMilliseconds() : 0);
|
|
212
213
|
if (this.date && parsedDate.getDate() !== this.value.getDate()) {
|
|
213
|
-
parsedDate = kendo_date_math_1.lastDayOfMonth(kendo_date_math_1.addMonths(parsedDate, -1));
|
|
214
|
+
parsedDate = (0, kendo_date_math_1.lastDayOfMonth)((0, kendo_date_math_1.addMonths)(parsedDate, -1));
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
217
|
}
|
|
@@ -326,7 +327,7 @@ var KendoDate = /** @class */ (function () {
|
|
|
326
327
|
return { text: resultText, format: resultFormat };
|
|
327
328
|
};
|
|
328
329
|
KendoDate.prototype.dateFieldName = function (part) {
|
|
329
|
-
var formatPlaceholder = this.formatPlaceholder || 'wide';
|
|
330
|
+
var formatPlaceholder = (this.formatPlaceholder || 'wide');
|
|
330
331
|
if (formatPlaceholder[part.type]) {
|
|
331
332
|
return formatPlaceholder[part.type];
|
|
332
333
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Mask = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* @hidden
|
|
5
6
|
*/
|
|
6
7
|
var Mask = /** @class */ (function () {
|
|
7
8
|
function Mask() {
|
|
8
9
|
this.symbols = '';
|
|
10
|
+
this.partMap = [];
|
|
9
11
|
}
|
|
10
12
|
return Mask;
|
|
11
13
|
}());
|
|
@@ -9,7 +9,7 @@ export declare const defaultFormatPlaceholder = "wide";
|
|
|
9
9
|
/**
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
|
-
export declare const padZero: (length:
|
|
12
|
+
export declare const padZero: (length: number) => string;
|
|
13
13
|
/**
|
|
14
14
|
* @hidden
|
|
15
15
|
*/
|
|
@@ -21,7 +21,7 @@ export declare const dateSymbolMap: (map: any, part: any) => Function;
|
|
|
21
21
|
/**
|
|
22
22
|
* @hidden
|
|
23
23
|
*/
|
|
24
|
-
export declare const isInRange: (candidate: Date, min: Date, max: Date) => boolean;
|
|
24
|
+
export declare const isInRange: (candidate: Date | null, min: Date, max: Date) => boolean;
|
|
25
25
|
/**
|
|
26
26
|
* @hidden
|
|
27
27
|
*/
|