@progress/kendo-angular-dateinputs 13.6.0-develop.9 → 14.0.0-develop.10
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/dateinput/dateinput.component.d.ts +93 -57
- package/datepicker/datepicker.component.d.ts +38 -1
- package/datetimepicker/datetimepicker.component.d.ts +38 -1
- package/esm2020/dateinput/dateinput.component.mjs +240 -821
- package/esm2020/datepicker/datepicker.component.mjs +63 -2
- package/esm2020/datetimepicker/datetimepicker.component.mjs +71 -3
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/timepicker/timepicker.component.mjs +53 -2
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +425 -827
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +426 -827
- package/package.json +13 -12
- package/timepicker/timepicker.component.d.ts +32 -1
|
@@ -12,7 +12,7 @@ import * as i8 from '@progress/kendo-angular-common';
|
|
|
12
12
|
import { isDocumentAvailable, guid, Keys as Keys$1, hasObservers, KendoInput, EventsModule, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
13
13
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
14
14
|
import * as i1 from '@progress/kendo-angular-intl';
|
|
15
|
-
import { IntlModule } from '@progress/kendo-angular-intl';
|
|
15
|
+
import { localeData, IntlModule } from '@progress/kendo-angular-intl';
|
|
16
16
|
import { Subject, Subscription, ReplaySubject, Observable, combineLatest, of, interval, animationFrameScheduler, fromEvent, EMPTY, from, BehaviorSubject, merge } from 'rxjs';
|
|
17
17
|
import * as i7 from '@angular/common';
|
|
18
18
|
import { CommonModule } from '@angular/common';
|
|
@@ -20,6 +20,7 @@ import { chevronRightIcon, chevronLeftIcon, caretAltUpIcon, caretAltDownIcon, ca
|
|
|
20
20
|
import * as i10 from '@progress/kendo-angular-buttons';
|
|
21
21
|
import { ButtonModule } from '@progress/kendo-angular-buttons';
|
|
22
22
|
import { map, scan, takeWhile, debounceTime, tap, filter } from 'rxjs/operators';
|
|
23
|
+
import { DateInput } from '@progress/kendo-dateinputs-common';
|
|
23
24
|
import * as i7$1 from '@progress/kendo-angular-icons';
|
|
24
25
|
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
25
26
|
import * as i1$2 from '@progress/kendo-angular-popup';
|
|
@@ -36,8 +37,8 @@ const packageMetadata = {
|
|
|
36
37
|
name: '@progress/kendo-angular-dateinputs',
|
|
37
38
|
productName: 'Kendo UI for Angular',
|
|
38
39
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
39
|
-
publishDate:
|
|
40
|
-
version: '
|
|
40
|
+
publishDate: 1696599411,
|
|
41
|
+
version: '14.0.0-develop.10',
|
|
41
42
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
42
43
|
};
|
|
43
44
|
|
|
@@ -7040,424 +7041,37 @@ let nextId = 0;
|
|
|
7040
7041
|
const MIN_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DateInputComponent/#toc-min';
|
|
7041
7042
|
const MAX_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DateInputComponent/#toc-max';
|
|
7042
7043
|
const VALUE_DOC_LINK$3 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/dateinput/#toc-using-with-json';
|
|
7043
|
-
const DATE_PART_REGEXP = /year|month|<day>/;
|
|
7044
|
-
const TIME_PART_REGEXP = /hour|minute|second|millisecond/;
|
|
7045
|
-
const SHORT_PATTERN_LENGTH_REGEXP = /d|M|H|h|m|s/;
|
|
7046
7044
|
const TWO_DIGIT_YEAR_MAX$2 = 68;
|
|
7047
|
-
const PREVIOUS_CENTURY_BASE = 1900;
|
|
7048
|
-
const CURRENT_CENTURY_BASE = 2000;
|
|
7049
7045
|
const DEFAULT_FORMAT$1 = 'd';
|
|
7050
|
-
const
|
|
7051
|
-
const
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
this.
|
|
7061
|
-
this.
|
|
7062
|
-
this.
|
|
7063
|
-
this.
|
|
7064
|
-
this.
|
|
7065
|
-
this.
|
|
7066
|
-
this.
|
|
7067
|
-
this.
|
|
7068
|
-
this.
|
|
7069
|
-
this.
|
|
7070
|
-
this.
|
|
7071
|
-
this.
|
|
7072
|
-
this.
|
|
7073
|
-
this.
|
|
7074
|
-
this.
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
"a": "a",
|
|
7080
|
-
"d": "d",
|
|
7081
|
-
"h": "h",
|
|
7082
|
-
"m": "m",
|
|
7083
|
-
"s": "s",
|
|
7084
|
-
"S": "S",
|
|
7085
|
-
"y": "y"
|
|
7086
|
-
};
|
|
7087
|
-
validatePackage(packageMetadata);
|
|
7088
|
-
this.monthNames = this.allFormatedMonths();
|
|
7089
|
-
this.dayPeriods = this.allDayPeriods();
|
|
7090
|
-
if (!value) {
|
|
7091
|
-
this.value = getDate(new Date());
|
|
7092
|
-
const sampleFormat = this.dateFormatString(this.value, this.format).symbols;
|
|
7093
|
-
for (let i = 0; i < sampleFormat.length; i++) {
|
|
7094
|
-
this.setExisting(sampleFormat[i], false);
|
|
7095
|
-
}
|
|
7096
|
-
}
|
|
7097
|
-
else {
|
|
7098
|
-
this.value = cloneDate(value);
|
|
7099
|
-
}
|
|
7100
|
-
}
|
|
7101
|
-
hasValue() {
|
|
7102
|
-
const pred = (a, p) => a || p.type !== 'literal' && p.type !== 'dayperiod' && this.getExisting(p.pattern[0]);
|
|
7103
|
-
return this.intl.splitDateFormat(this.format).reduce(pred, false);
|
|
7104
|
-
}
|
|
7105
|
-
shouldNormalizeCentury() {
|
|
7106
|
-
return this.intl.splitDateFormat(this.format).some(part => part.pattern === 'yy');
|
|
7107
|
-
}
|
|
7108
|
-
getDateObject() {
|
|
7109
|
-
for (let i = 0; i < this.knownParts.length; i++) {
|
|
7110
|
-
if (!this.getExisting(this.knownParts[i])) {
|
|
7111
|
-
return null;
|
|
7112
|
-
}
|
|
7113
|
-
}
|
|
7114
|
-
return cloneDate(this.value);
|
|
7115
|
-
}
|
|
7116
|
-
getTextAndFormat(format) {
|
|
7117
|
-
return this.merge(this.intl.formatDate(this.value, format), this.dateFormatString(this.value, format));
|
|
7118
|
-
}
|
|
7119
|
-
getExisting(symbol) {
|
|
7120
|
-
switch (symbol) {
|
|
7121
|
-
case "y": return this.year;
|
|
7122
|
-
case "M":
|
|
7123
|
-
case "L": return this.month;
|
|
7124
|
-
case "d": return this.date;
|
|
7125
|
-
case "E": return this.date && this.month && this.year;
|
|
7126
|
-
case "h":
|
|
7127
|
-
case "H": return this.hours;
|
|
7128
|
-
case "m": return this.minutes;
|
|
7129
|
-
case "s": return this.seconds;
|
|
7130
|
-
case "S": return this.milliseconds;
|
|
7131
|
-
default: return true;
|
|
7132
|
-
}
|
|
7133
|
-
}
|
|
7134
|
-
setExisting(symbol, value) {
|
|
7135
|
-
switch (symbol) {
|
|
7136
|
-
case "y":
|
|
7137
|
-
this.year = value;
|
|
7138
|
-
if (value === false) {
|
|
7139
|
-
this.value.setFullYear(2000);
|
|
7140
|
-
}
|
|
7141
|
-
break; //allow 2/29 dates
|
|
7142
|
-
case "M":
|
|
7143
|
-
this.month = value;
|
|
7144
|
-
if (value === false) {
|
|
7145
|
-
this.value.setMonth(0);
|
|
7146
|
-
}
|
|
7147
|
-
break; //make sure you can type 31 at day part
|
|
7148
|
-
case "d":
|
|
7149
|
-
this.date = value;
|
|
7150
|
-
break;
|
|
7151
|
-
case "h":
|
|
7152
|
-
case "H":
|
|
7153
|
-
this.hours = value;
|
|
7154
|
-
break;
|
|
7155
|
-
case "m":
|
|
7156
|
-
this.minutes = value;
|
|
7157
|
-
break;
|
|
7158
|
-
case "s":
|
|
7159
|
-
this.seconds = value;
|
|
7160
|
-
break;
|
|
7161
|
-
case "S":
|
|
7162
|
-
this.milliseconds = value;
|
|
7163
|
-
break;
|
|
7164
|
-
default: return;
|
|
7165
|
-
}
|
|
7166
|
-
}
|
|
7167
|
-
modifyPart(symbol, offset) {
|
|
7168
|
-
let newValue = cloneDate(this.value);
|
|
7169
|
-
switch (symbol) {
|
|
7170
|
-
case "y":
|
|
7171
|
-
newValue.setFullYear(newValue.getFullYear() + offset);
|
|
7172
|
-
break;
|
|
7173
|
-
case "M":
|
|
7174
|
-
newValue = addMonths(this.value, offset);
|
|
7175
|
-
break;
|
|
7176
|
-
case "d":
|
|
7177
|
-
case "E":
|
|
7178
|
-
newValue.setDate(newValue.getDate() + offset);
|
|
7179
|
-
break;
|
|
7180
|
-
case "h":
|
|
7181
|
-
case "H":
|
|
7182
|
-
newValue.setHours(newValue.getHours() + offset);
|
|
7183
|
-
break;
|
|
7184
|
-
case "m":
|
|
7185
|
-
newValue.setMinutes(newValue.getMinutes() + offset);
|
|
7186
|
-
break;
|
|
7187
|
-
case "s":
|
|
7188
|
-
newValue.setSeconds(newValue.getSeconds() + offset);
|
|
7189
|
-
break;
|
|
7190
|
-
case "S":
|
|
7191
|
-
newValue.setMilliseconds(newValue.getMilliseconds() + offset);
|
|
7192
|
-
break;
|
|
7193
|
-
case "a":
|
|
7194
|
-
newValue.setHours(newValue.getHours() + (12 * offset));
|
|
7195
|
-
break;
|
|
7196
|
-
default: break;
|
|
7197
|
-
}
|
|
7198
|
-
if (this.shouldNormalizeCentury()) {
|
|
7199
|
-
newValue = this.normalizeCentury(newValue);
|
|
7200
|
-
}
|
|
7201
|
-
if (newValue.getFullYear() > 0) {
|
|
7202
|
-
this.setExisting(symbol, true);
|
|
7203
|
-
this.value = newValue;
|
|
7204
|
-
}
|
|
7205
|
-
}
|
|
7206
|
-
parsePart(symbol, currentChar, resetSegmentValue) {
|
|
7207
|
-
if (!currentChar) {
|
|
7208
|
-
this.resetLeadingZero();
|
|
7209
|
-
this.setExisting(symbol, false);
|
|
7210
|
-
return { value: null, switchToNext: false };
|
|
7211
|
-
}
|
|
7212
|
-
const baseDate = this.intl.formatDate(this.value, this.format);
|
|
7213
|
-
const dateParts = this.dateFormatString(this.value, this.format);
|
|
7214
|
-
const baseFormat = dateParts.symbols;
|
|
7215
|
-
let replaced = false;
|
|
7216
|
-
let prefix = "";
|
|
7217
|
-
let current = "";
|
|
7218
|
-
let suffix = "";
|
|
7219
|
-
for (let i = 0; i < baseDate.length; i++) {
|
|
7220
|
-
if (baseFormat[i] === symbol) {
|
|
7221
|
-
current += this.getExisting(symbol) ? baseDate[i] : "0";
|
|
7222
|
-
replaced = true;
|
|
7223
|
-
}
|
|
7224
|
-
else if (!replaced) {
|
|
7225
|
-
prefix += baseDate[i];
|
|
7226
|
-
}
|
|
7227
|
-
else {
|
|
7228
|
-
suffix += baseDate[i];
|
|
7229
|
-
}
|
|
7230
|
-
}
|
|
7231
|
-
const currentMaxLength = current.length - 3;
|
|
7232
|
-
let parsedDate = null;
|
|
7233
|
-
const month = this.matchMonth(currentChar);
|
|
7234
|
-
const dayPeriod = this.matchDayPeriod(currentChar, symbol);
|
|
7235
|
-
const isZeroCurrentChar = currentChar === '0';
|
|
7236
|
-
const leadingZero = (this.leadingZero || {})[symbol] || 0;
|
|
7237
|
-
if (isZeroCurrentChar) {
|
|
7238
|
-
const valueNumber = parseInt(resetSegmentValue ? currentChar : current + currentChar, 10);
|
|
7239
|
-
if (valueNumber === 0 && !this.isAbbrMonth(dateParts.partMap, symbol)) {
|
|
7240
|
-
this.incrementLeadingZero(symbol);
|
|
7241
|
-
}
|
|
7242
|
-
}
|
|
7243
|
-
else {
|
|
7244
|
-
this.resetLeadingZero();
|
|
7245
|
-
}
|
|
7246
|
-
for (let i = Math.max(0, currentMaxLength); i <= current.length; i++) {
|
|
7247
|
-
let middle = resetSegmentValue ? currentChar : (current.substring(i) + currentChar);
|
|
7248
|
-
if (symbol === "S" && resetSegmentValue) {
|
|
7249
|
-
// The "S" parser in intl parses "1" as 100ms in order to handle ISOString dates correctly, so to get 1ms, we need to pass "001"
|
|
7250
|
-
const padding = msPaddingFromFormat(baseFormat);
|
|
7251
|
-
middle = padding + middle;
|
|
7252
|
-
}
|
|
7253
|
-
const middleNumber = parseInt(middle, 10);
|
|
7254
|
-
parsedDate = this.intl.parseDate(prefix + middle + suffix, this.format);
|
|
7255
|
-
if (!parsedDate && !isNaN(middleNumber) && !isNaN(parseInt(currentChar, 10))) {
|
|
7256
|
-
if (symbol === 'M' && !month) {
|
|
7257
|
-
const monthNumber = middleNumber - 1;
|
|
7258
|
-
if (monthNumber > -1 && monthNumber < 12) {
|
|
7259
|
-
parsedDate = cloneDate(this.value);
|
|
7260
|
-
parsedDate.setMonth(monthNumber);
|
|
7261
|
-
if (parsedDate.getMonth() !== monthNumber) {
|
|
7262
|
-
parsedDate = lastDayOfMonth(addMonths(parsedDate, -1));
|
|
7263
|
-
}
|
|
7264
|
-
}
|
|
7265
|
-
}
|
|
7266
|
-
if (symbol === 'y') {
|
|
7267
|
-
parsedDate = 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);
|
|
7268
|
-
if (this.date && parsedDate.getDate() !== this.value.getDate()) {
|
|
7269
|
-
parsedDate = lastDayOfMonth(addMonths(parsedDate, -1));
|
|
7270
|
-
}
|
|
7271
|
-
}
|
|
7272
|
-
}
|
|
7273
|
-
if (parsedDate) {
|
|
7274
|
-
//move to next segment if the part will overflow with next char
|
|
7275
|
-
//when start from empty date (01, then 010), padded zeros should be trimmed
|
|
7276
|
-
const patternValue = this.partPattern(dateParts.partMap, symbol).pattern;
|
|
7277
|
-
const peekDate = this.intl.parseDate(`${prefix}${this.peek(middle, patternValue)}${suffix}`, this.format);
|
|
7278
|
-
const patternLength = this.patternLength(patternValue) || patternValue.length;
|
|
7279
|
-
const patternSatisfied = (leadingZero + (unpadZero(middle) || currentChar).length) >= patternLength;
|
|
7280
|
-
const switchToNext = peekDate === null || patternSatisfied;
|
|
7281
|
-
if (this.shouldNormalizeCentury()) {
|
|
7282
|
-
parsedDate = this.normalizeCentury(parsedDate);
|
|
7283
|
-
}
|
|
7284
|
-
this.value = parsedDate;
|
|
7285
|
-
this.setExisting(symbol, true);
|
|
7286
|
-
return { value: this.value, switchToNext: switchToNext };
|
|
7287
|
-
}
|
|
7288
|
-
}
|
|
7289
|
-
if (month) {
|
|
7290
|
-
parsedDate = this.intl.parseDate(prefix + month + suffix, this.format);
|
|
7291
|
-
if (parsedDate) {
|
|
7292
|
-
this.value = parsedDate;
|
|
7293
|
-
this.setExisting(symbol, true);
|
|
7294
|
-
return { value: this.value, switchToNext: false };
|
|
7295
|
-
}
|
|
7296
|
-
}
|
|
7297
|
-
if (dayPeriod) {
|
|
7298
|
-
parsedDate = this.intl.parseDate(prefix + dayPeriod + suffix, this.format);
|
|
7299
|
-
if (parsedDate) {
|
|
7300
|
-
this.value = parsedDate;
|
|
7301
|
-
return { value: this.value, switchToNext: true };
|
|
7302
|
-
}
|
|
7303
|
-
}
|
|
7304
|
-
if (isZeroCurrentChar) {
|
|
7305
|
-
this.setExisting(symbol, false);
|
|
7306
|
-
}
|
|
7307
|
-
return { value: null, switchToNext: false };
|
|
7308
|
-
}
|
|
7309
|
-
resetLeadingZero() {
|
|
7310
|
-
const hasLeadingZero = this.leadingZero !== null;
|
|
7311
|
-
this.setLeadingZero(null);
|
|
7312
|
-
return hasLeadingZero;
|
|
7313
|
-
}
|
|
7314
|
-
setLeadingZero(leadingZero) {
|
|
7315
|
-
this.leadingZero = leadingZero;
|
|
7316
|
-
}
|
|
7317
|
-
normalizeCentury(date) {
|
|
7318
|
-
if (!isPresent(date)) {
|
|
7319
|
-
return date;
|
|
7320
|
-
}
|
|
7321
|
-
const twoDigitYear = cropTwoDigitYear(date);
|
|
7322
|
-
const centuryBase = this.getNormalizedCenturyBase(twoDigitYear);
|
|
7323
|
-
const normalizedDate = setYears(date, centuryBase + twoDigitYear);
|
|
7324
|
-
return normalizedDate;
|
|
7325
|
-
}
|
|
7326
|
-
incrementLeadingZero(symbol) {
|
|
7327
|
-
const leadingZero = this.leadingZero || {};
|
|
7328
|
-
leadingZero[symbol] = (leadingZero[symbol] || 0) + 1;
|
|
7329
|
-
this.leadingZero = leadingZero;
|
|
7330
|
-
}
|
|
7331
|
-
isAbbrMonth(parts, symbol) {
|
|
7332
|
-
const pattern = this.partPattern(parts, symbol);
|
|
7333
|
-
return pattern.type === 'month' && pattern.names;
|
|
7334
|
-
}
|
|
7335
|
-
partPattern(parts, symbol) {
|
|
7336
|
-
return parts.filter((part) => part.pattern.indexOf(symbol) !== -1)[0];
|
|
7337
|
-
}
|
|
7338
|
-
peek(value, pattern) {
|
|
7339
|
-
const peekValue = unpadZero(value) + '0';
|
|
7340
|
-
return padZero(pattern.length - peekValue.length) + peekValue;
|
|
7341
|
-
}
|
|
7342
|
-
matchMonth(typedChar) {
|
|
7343
|
-
this.typedMonthPart += typedChar.toLowerCase();
|
|
7344
|
-
if (!this.monthNames) {
|
|
7345
|
-
return "";
|
|
7346
|
-
}
|
|
7347
|
-
while (this.typedMonthPart.length > 0) {
|
|
7348
|
-
for (let i = 0; i < this.monthNames.length; i++) {
|
|
7349
|
-
if (this.monthNames[i].toLowerCase().indexOf(this.typedMonthPart) === 0) {
|
|
7350
|
-
return this.monthNames[i];
|
|
7351
|
-
}
|
|
7352
|
-
}
|
|
7353
|
-
const monthAsNum = parseInt(this.typedMonthPart, 10);
|
|
7354
|
-
if (monthAsNum >= 1 && monthAsNum <= 12 && monthAsNum.toString() === this.typedMonthPart /*ensure they exact match*/) {
|
|
7355
|
-
return this.monthNames[monthAsNum - 1];
|
|
7356
|
-
}
|
|
7357
|
-
this.typedMonthPart = this.typedMonthPart.substring(1, this.typedMonthPart.length);
|
|
7358
|
-
}
|
|
7359
|
-
return "";
|
|
7360
|
-
}
|
|
7361
|
-
matchDayPeriod(typedChar, symbol) {
|
|
7362
|
-
const lowerChart = String(typedChar).toLowerCase();
|
|
7363
|
-
if (symbol === 'a' && this.dayPeriods) {
|
|
7364
|
-
if (this.dayPeriods.am.toLowerCase().startsWith(lowerChart)) {
|
|
7365
|
-
return this.dayPeriods.am;
|
|
7366
|
-
}
|
|
7367
|
-
else if (this.dayPeriods.pm.toLowerCase().startsWith(lowerChart)) {
|
|
7368
|
-
return this.dayPeriods.pm;
|
|
7369
|
-
}
|
|
7370
|
-
}
|
|
7371
|
-
return '';
|
|
7372
|
-
}
|
|
7373
|
-
allFormatedMonths() {
|
|
7374
|
-
const dateFormatParts = this.intl.splitDateFormat(this.format);
|
|
7375
|
-
for (let i = 0; i < dateFormatParts.length; i++) {
|
|
7376
|
-
if (dateFormatParts[i].type === "month" && dateFormatParts[i].names) {
|
|
7377
|
-
return this.intl.dateFormatNames(dateFormatParts[i].names);
|
|
7378
|
-
}
|
|
7379
|
-
}
|
|
7380
|
-
return null;
|
|
7381
|
-
}
|
|
7382
|
-
allDayPeriods() {
|
|
7383
|
-
const dateFormatParts = this.intl.splitDateFormat(this.format);
|
|
7384
|
-
for (let i = 0; i < dateFormatParts.length; i++) {
|
|
7385
|
-
if (dateFormatParts[i].type === "dayperiod" && dateFormatParts[i].names) {
|
|
7386
|
-
return this.intl.dateFormatNames(dateFormatParts[i].names);
|
|
7387
|
-
}
|
|
7388
|
-
}
|
|
7389
|
-
return null;
|
|
7390
|
-
}
|
|
7391
|
-
patternLength(pattern) {
|
|
7392
|
-
if (pattern[0] === 'y') {
|
|
7393
|
-
return 4;
|
|
7394
|
-
}
|
|
7395
|
-
if (SHORT_PATTERN_LENGTH_REGEXP.test(pattern)) {
|
|
7396
|
-
return 2;
|
|
7397
|
-
}
|
|
7398
|
-
return 0;
|
|
7399
|
-
}
|
|
7400
|
-
//TODO: REMOVE!
|
|
7401
|
-
dateFormatString(date, format) {
|
|
7402
|
-
const dateFormatParts = this.intl.splitDateFormat(format);
|
|
7403
|
-
const parts = [];
|
|
7404
|
-
const partMap = [];
|
|
7405
|
-
for (let i = 0; i < dateFormatParts.length; i++) {
|
|
7406
|
-
let partLength = this.intl.formatDate(date, { pattern: dateFormatParts[i].pattern }).length;
|
|
7407
|
-
while (partLength > 0) {
|
|
7408
|
-
parts.push(this.symbols[dateFormatParts[i].pattern[0]] || "_");
|
|
7409
|
-
partMap.push(dateFormatParts[i]);
|
|
7410
|
-
partLength--;
|
|
7411
|
-
}
|
|
7412
|
-
}
|
|
7413
|
-
const returnValue = new Mask();
|
|
7414
|
-
returnValue.symbols = parts.join("");
|
|
7415
|
-
returnValue.partMap = partMap;
|
|
7416
|
-
return returnValue;
|
|
7417
|
-
}
|
|
7418
|
-
merge(text, mask) {
|
|
7419
|
-
// Important: right to left.
|
|
7420
|
-
let resultText = "";
|
|
7421
|
-
let resultFormat = "";
|
|
7422
|
-
const format = mask.symbols;
|
|
7423
|
-
for (let r = format.length - 1; r >= 0; r--) {
|
|
7424
|
-
if (this.knownParts.indexOf(format[r]) === -1 || this.getExisting(format[r])) {
|
|
7425
|
-
resultText = text[r] + resultText;
|
|
7426
|
-
resultFormat = format[r] + resultFormat;
|
|
7427
|
-
}
|
|
7428
|
-
else {
|
|
7429
|
-
const currentSymbol = format[r];
|
|
7430
|
-
while (r >= 0 && currentSymbol === format[r]) {
|
|
7431
|
-
r--;
|
|
7432
|
-
}
|
|
7433
|
-
r++;
|
|
7434
|
-
if (this.leadingZero && this.leadingZero[currentSymbol]) {
|
|
7435
|
-
resultText = '0' + resultText;
|
|
7436
|
-
}
|
|
7437
|
-
else {
|
|
7438
|
-
resultText = this.dateFieldName(mask.partMap[r]) + resultText;
|
|
7439
|
-
}
|
|
7440
|
-
while (resultFormat.length < resultText.length) {
|
|
7441
|
-
resultFormat = format[r] + resultFormat;
|
|
7442
|
-
}
|
|
7443
|
-
}
|
|
7444
|
-
}
|
|
7445
|
-
return [resultText, resultFormat];
|
|
7446
|
-
}
|
|
7447
|
-
dateFieldName(part) {
|
|
7448
|
-
const formatPlaceholder = this.formatPlaceholder || 'wide';
|
|
7449
|
-
if (formatPlaceholder[part.type]) {
|
|
7450
|
-
return formatPlaceholder[part.type];
|
|
7451
|
-
}
|
|
7452
|
-
if (formatPlaceholder === 'formatPattern') {
|
|
7453
|
-
return part.pattern;
|
|
7454
|
-
}
|
|
7455
|
-
return this.intl.dateFieldName(Object.assign(part, { nameType: formatPlaceholder }));
|
|
7456
|
-
}
|
|
7457
|
-
getNormalizedCenturyBase(twoDigitYear) {
|
|
7458
|
-
return twoDigitYear > this.twoDigitYearMax ?
|
|
7459
|
-
PREVIOUS_CENTURY_BASE :
|
|
7460
|
-
CURRENT_CENTURY_BASE;
|
|
7046
|
+
const DEFAULT_FORMAT_PLACEHOLDER = 'wide';
|
|
7047
|
+
const DATE_PART_REGEXP = /year|month|<day>/;
|
|
7048
|
+
const TIME_PART_REGEXP = /hour|minute|second|millisecond/;
|
|
7049
|
+
/**
|
|
7050
|
+
* @hidden
|
|
7051
|
+
* Need to overrite `dateFormatNames` parameters order and provide `cldr` object
|
|
7052
|
+
* required by the kendo-dateinputs-common package
|
|
7053
|
+
*/
|
|
7054
|
+
class DateInputIntl {
|
|
7055
|
+
constructor(service) {
|
|
7056
|
+
this.service = service;
|
|
7057
|
+
this.cldr = {};
|
|
7058
|
+
this.localeId = service['localeId'];
|
|
7059
|
+
this.format = service.format;
|
|
7060
|
+
this.toString = service.toString;
|
|
7061
|
+
this.formatDate = service.formatDate;
|
|
7062
|
+
this.parseDate = service.parseDate;
|
|
7063
|
+
this.parseNumber = service.parseNumber;
|
|
7064
|
+
this.formatNumber = service.formatNumber;
|
|
7065
|
+
this.splitDateFormat = service.splitDateFormat;
|
|
7066
|
+
this.numberSymbols = service.numberSymbols;
|
|
7067
|
+
this.firstDay = service.firstDay;
|
|
7068
|
+
this.weekendRange = service.weekendRange;
|
|
7069
|
+
this.dateFieldName = service.dateFieldName;
|
|
7070
|
+
this.dateFormatNames = (localeId, options) => this.service.dateFormatNames(options, localeId || this.localeId);
|
|
7071
|
+
const _localeData = localeData(this.localeId);
|
|
7072
|
+
// Setting the `cldr` object from here could be avoided if the logic in the common package is revisited to
|
|
7073
|
+
// directly relies on the `localeId` being set as part of the options => TBD and validated for all suites
|
|
7074
|
+
this.cldr[_localeData.name] = _localeData;
|
|
7461
7075
|
}
|
|
7462
7076
|
}
|
|
7463
7077
|
/**
|
|
@@ -7553,16 +7167,50 @@ class DateInputComponent {
|
|
|
7553
7167
|
* }
|
|
7554
7168
|
* ```
|
|
7555
7169
|
*/
|
|
7556
|
-
this.steps = {
|
|
7170
|
+
this.steps = {
|
|
7171
|
+
// Default values are needed until fix in common package: https://github.com/telerik/kendo-dateinputs-common/issues/26
|
|
7172
|
+
second: 1,
|
|
7173
|
+
minute: 1,
|
|
7174
|
+
hour: 1,
|
|
7175
|
+
day: 1,
|
|
7176
|
+
month: 1,
|
|
7177
|
+
year: 1
|
|
7178
|
+
};
|
|
7557
7179
|
/**
|
|
7558
7180
|
* Determines whether the built-in min or max validators are to be enforced when a form is being validated.
|
|
7559
7181
|
*/
|
|
7560
7182
|
this.rangeValidation = true;
|
|
7561
7183
|
/**
|
|
7562
7184
|
* @hidden
|
|
7563
|
-
*
|
|
7185
|
+
*
|
|
7186
|
+
* Determines whether to auto correct invalid segments automatically.
|
|
7187
|
+
* TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
|
|
7188
|
+
*
|
|
7189
|
+
* @default true
|
|
7190
|
+
*/
|
|
7191
|
+
this.autoCorrectParts = true;
|
|
7192
|
+
/**
|
|
7193
|
+
* Determines whether to automatically move to the next segment after the user completes the current one.
|
|
7194
|
+
*
|
|
7195
|
+
* @default true
|
|
7196
|
+
*/
|
|
7197
|
+
this.autoSwitchParts = true;
|
|
7198
|
+
/**
|
|
7199
|
+
* A string array representing custom keys, which will move the focus to the next date format segment.
|
|
7200
|
+
*/
|
|
7201
|
+
this.autoSwitchKeys = [];
|
|
7202
|
+
/**
|
|
7203
|
+
* Determines if the users should see a blinking caret inside the Date Input when possible.
|
|
7204
|
+
*
|
|
7205
|
+
* @default false
|
|
7564
7206
|
*/
|
|
7565
|
-
this.
|
|
7207
|
+
this.allowCaretMode = false;
|
|
7208
|
+
/**
|
|
7209
|
+
* When enabled, the DateInput will autofill the rest of the date to the current date when the component loses focus.
|
|
7210
|
+
*
|
|
7211
|
+
* @default false
|
|
7212
|
+
*/
|
|
7213
|
+
this.autoFill = false;
|
|
7566
7214
|
/**
|
|
7567
7215
|
* Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
7568
7216
|
*/
|
|
@@ -7575,6 +7223,12 @@ class DateInputComponent {
|
|
|
7575
7223
|
* will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
|
|
7576
7224
|
*/
|
|
7577
7225
|
this.twoDigitYearMax = TWO_DIGIT_YEAR_MAX$2;
|
|
7226
|
+
/**
|
|
7227
|
+
* Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
|
|
7228
|
+
*
|
|
7229
|
+
* @default true
|
|
7230
|
+
*/
|
|
7231
|
+
this.enableMouseWheel = true;
|
|
7578
7232
|
/**
|
|
7579
7233
|
* Specifies whether the **Up** and **Down** spin buttons will be rendered.
|
|
7580
7234
|
* For more information, refer to the article on
|
|
@@ -7651,18 +7305,16 @@ class DateInputComponent {
|
|
|
7651
7305
|
* @hidden
|
|
7652
7306
|
*/
|
|
7653
7307
|
this.isDateIncomplete = false;
|
|
7654
|
-
this.currentValue = "";
|
|
7655
7308
|
this.currentFormat = "";
|
|
7656
|
-
this.backspace = false;
|
|
7657
|
-
this.resetSegmentValue = true;
|
|
7658
7309
|
this.minValidator = noop$2;
|
|
7659
7310
|
this.maxValidator = noop$2;
|
|
7660
7311
|
this.incompleteValidator = noop$2;
|
|
7661
7312
|
this._value = null;
|
|
7662
7313
|
this._active = false;
|
|
7663
7314
|
this._focusableId = `dateinput-${nextId++}`;
|
|
7315
|
+
this._formatPlaceholder = DEFAULT_FORMAT_PLACEHOLDER;
|
|
7664
7316
|
this.kendoDate = null;
|
|
7665
|
-
this.
|
|
7317
|
+
this.kendoDateObject = null;
|
|
7666
7318
|
this.domEvents = [];
|
|
7667
7319
|
this.onControlChange = noop$2;
|
|
7668
7320
|
this.onControlTouched = noop$2;
|
|
@@ -7671,8 +7323,7 @@ class DateInputComponent {
|
|
|
7671
7323
|
this._rounded = DEFAULT_ROUNDED;
|
|
7672
7324
|
this._fillMode = DEFAULT_FILL_MODE;
|
|
7673
7325
|
this.subs = new Subscription();
|
|
7674
|
-
|
|
7675
|
-
this.updateFormatSections();
|
|
7326
|
+
validatePackage(packageMetadata);
|
|
7676
7327
|
if (this.pickerService) {
|
|
7677
7328
|
this.pickerService.input = this;
|
|
7678
7329
|
}
|
|
@@ -7709,6 +7360,58 @@ class DateInputComponent {
|
|
|
7709
7360
|
get tabIndex() {
|
|
7710
7361
|
return this.tabindex;
|
|
7711
7362
|
}
|
|
7363
|
+
/**
|
|
7364
|
+
* Defines the descriptions of the format sections in the input field.
|
|
7365
|
+
* For more information, refer to the article on
|
|
7366
|
+
* [placeholders]({% slug placeholders_dateinput %}).
|
|
7367
|
+
*
|
|
7368
|
+
* @example
|
|
7369
|
+
* ```ts
|
|
7370
|
+
* _@Component({
|
|
7371
|
+
* selector: 'my-app',
|
|
7372
|
+
* template: `
|
|
7373
|
+
* <div class="row example-wrapper" [style.min-height.px]="450">
|
|
7374
|
+
* <div class="col-xs-12 col-md-6 example-col">
|
|
7375
|
+
* <p>Full-length format description:</p>
|
|
7376
|
+
* <kendo-dateinput formatPlaceholder="wide"></kendo-dateinput>
|
|
7377
|
+
* </div>
|
|
7378
|
+
*
|
|
7379
|
+
* <div class="col-xs-12 col-md-6 example-col">
|
|
7380
|
+
* <p>Narrow-length format description:</p>
|
|
7381
|
+
* <kendo-dateinput formatPlaceholder="narrow"></kendo-dateinput>
|
|
7382
|
+
* </div>
|
|
7383
|
+
*
|
|
7384
|
+
* <div class="col-xs-12 col-md-6 example-col">
|
|
7385
|
+
* <p>Short-length format description:</p>
|
|
7386
|
+
* <kendo-dateinput formatPlaceholder="short"></kendo-dateinput>
|
|
7387
|
+
* </div>
|
|
7388
|
+
*
|
|
7389
|
+
* <div class="col-xs-12 col-md-6 example-col">
|
|
7390
|
+
* <p>Display defined format:</p>
|
|
7391
|
+
* <kendo-dateinput format="MM/dd/yyyy" formatPlaceholder="formatPattern"></kendo-dateinput>
|
|
7392
|
+
* </div>
|
|
7393
|
+
*
|
|
7394
|
+
* <div class="col-xs-12 col-md-6 example-col">
|
|
7395
|
+
* <p>Custom defined format descriptions</p>
|
|
7396
|
+
* <kendo-dateinput format="G"
|
|
7397
|
+
* [formatPlaceholder]="{
|
|
7398
|
+
* year: 'y', month: 'M', day: 'd',
|
|
7399
|
+
* hour: 'h', minute: 'm', second: 's'
|
|
7400
|
+
* }"
|
|
7401
|
+
* ></kendo-dateinput>
|
|
7402
|
+
* </div>
|
|
7403
|
+
* </div>
|
|
7404
|
+
* `
|
|
7405
|
+
* })
|
|
7406
|
+
* export class AppComponent { }
|
|
7407
|
+
* ```
|
|
7408
|
+
*/
|
|
7409
|
+
set formatPlaceholder(format) {
|
|
7410
|
+
this._formatPlaceholder = format ? format : DEFAULT_FORMAT_PLACEHOLDER;
|
|
7411
|
+
}
|
|
7412
|
+
get formatPlaceholder() {
|
|
7413
|
+
return this._formatPlaceholder;
|
|
7414
|
+
}
|
|
7712
7415
|
/**
|
|
7713
7416
|
* Specifies the value of the DateInput component.
|
|
7714
7417
|
*
|
|
@@ -7716,9 +7419,6 @@ class DateInputComponent {
|
|
|
7716
7419
|
*/
|
|
7717
7420
|
set value(value) {
|
|
7718
7421
|
this.verifyValue(value);
|
|
7719
|
-
if (this.autoCorrect && !isInRange(value, this.min, this.max)) {
|
|
7720
|
-
return;
|
|
7721
|
-
}
|
|
7722
7422
|
this._value = cloneDate(value);
|
|
7723
7423
|
this.valueUpdate.emit(cloneDate(value));
|
|
7724
7424
|
}
|
|
@@ -7830,34 +7530,39 @@ class DateInputComponent {
|
|
|
7830
7530
|
const ngControl = this.injector.get(NgControl, null);
|
|
7831
7531
|
return (ngControl === null || ngControl === void 0 ? void 0 : ngControl.control) || null;
|
|
7832
7532
|
}
|
|
7833
|
-
get
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
return this.format.displayFormat;
|
|
7853
|
-
}
|
|
7533
|
+
get options() {
|
|
7534
|
+
return {
|
|
7535
|
+
format: this.format,
|
|
7536
|
+
steps: this.steps,
|
|
7537
|
+
readonly: this.readonly,
|
|
7538
|
+
formatPlaceholder: this.formatPlaceholder,
|
|
7539
|
+
placeholder: this.placeholder,
|
|
7540
|
+
autoCorrectParts: this.autoCorrectParts,
|
|
7541
|
+
autoSwitchParts: this.autoSwitchParts,
|
|
7542
|
+
selectPreviousSegmentOnBackspace: true,
|
|
7543
|
+
autoSwitchKeys: this.autoSwitchKeys,
|
|
7544
|
+
twoDigitYearMax: this.twoDigitYearMax,
|
|
7545
|
+
enableMouseWheel: this.enableMouseWheel,
|
|
7546
|
+
selectNearestSegmentOnFocus: false,
|
|
7547
|
+
allowCaretMode: this.allowCaretMode,
|
|
7548
|
+
autoFill: this.autoFill,
|
|
7549
|
+
value: this.value,
|
|
7550
|
+
intlService: new DateInputIntl(this.intl)
|
|
7551
|
+
};
|
|
7854
7552
|
}
|
|
7855
7553
|
/**
|
|
7856
7554
|
* @hidden
|
|
7857
7555
|
* Used by the TextBoxContainer to determine if the component is empty
|
|
7858
7556
|
*/
|
|
7859
7557
|
isEmpty() {
|
|
7860
|
-
|
|
7558
|
+
const currentValue = this.dateInput.nativeElement.value;
|
|
7559
|
+
return !currentValue || !String(currentValue).trim();
|
|
7560
|
+
}
|
|
7561
|
+
/**
|
|
7562
|
+
* @hidden
|
|
7563
|
+
*/
|
|
7564
|
+
handleDragAndDrop(args) {
|
|
7565
|
+
args.preventDefault();
|
|
7861
7566
|
}
|
|
7862
7567
|
/**
|
|
7863
7568
|
* @hidden
|
|
@@ -7869,21 +7574,23 @@ class DateInputComponent {
|
|
|
7869
7574
|
* @hidden
|
|
7870
7575
|
*/
|
|
7871
7576
|
ngOnInit() {
|
|
7872
|
-
|
|
7873
|
-
|
|
7577
|
+
if (this.kendoDate) {
|
|
7578
|
+
this.kendoDate.destroy();
|
|
7579
|
+
}
|
|
7580
|
+
this.kendoDate = this.initKendoDate();
|
|
7581
|
+
this.kendoDateObject = this.kendoDate.dateObject;
|
|
7582
|
+
this.updateFormatSections();
|
|
7874
7583
|
this.subs.add(this.intl.changes.subscribe(this.intlChange.bind(this)));
|
|
7875
7584
|
this.ngControl = this.injector.get(NgControl, null);
|
|
7876
7585
|
if (this.wrapper) {
|
|
7877
7586
|
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
7878
|
-
this.ngZone.runOutsideAngular(() => {
|
|
7879
|
-
this.bindEvents();
|
|
7880
|
-
});
|
|
7881
7587
|
}
|
|
7882
7588
|
}
|
|
7883
7589
|
/**
|
|
7884
7590
|
* @hidden
|
|
7885
7591
|
*/
|
|
7886
7592
|
ngOnChanges(changes) {
|
|
7593
|
+
var _a;
|
|
7887
7594
|
this.verifyRange();
|
|
7888
7595
|
if (changes['min'] || changes['max'] || changes['rangeValidation'] || changes['incompleteDateValidation']) {
|
|
7889
7596
|
this.minValidator = this.rangeValidation ? minValidator(this.min) : noop$2;
|
|
@@ -7891,14 +7598,37 @@ class DateInputComponent {
|
|
|
7891
7598
|
this.incompleteValidator = this.incompleteDateValidation ? incompleteDateValidator() : noop$2;
|
|
7892
7599
|
this.onValidatorChange();
|
|
7893
7600
|
}
|
|
7894
|
-
|
|
7895
|
-
|
|
7601
|
+
const isEqualToKendoDate = this.kendoDate && isEqual(this.value, this.kendoDate.value);
|
|
7602
|
+
if (changes['format'] || !isEqualToKendoDate || changes['placeholder']) {
|
|
7603
|
+
if (!this.kendoDate) {
|
|
7604
|
+
return;
|
|
7605
|
+
}
|
|
7606
|
+
;
|
|
7607
|
+
(_a = this.kendoDate) === null || _a === void 0 ? void 0 : _a.setOptions(this.options, true);
|
|
7896
7608
|
this.updateFormatSections();
|
|
7897
7609
|
}
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7610
|
+
}
|
|
7611
|
+
updateFormatSections() {
|
|
7612
|
+
this.formatSections = this.intl.splitDateFormat(this.kendoDate.inputFormat)
|
|
7613
|
+
.reduce(({ date, time }, p) => {
|
|
7614
|
+
return {
|
|
7615
|
+
date: date || DATE_PART_REGEXP.test(p.type),
|
|
7616
|
+
time: time || TIME_PART_REGEXP.test(p.type)
|
|
7617
|
+
};
|
|
7618
|
+
}, { date: false, time: false });
|
|
7619
|
+
}
|
|
7620
|
+
updateIncompleteValidationStatus() {
|
|
7621
|
+
const previousValue = this.isDateIncomplete;
|
|
7622
|
+
this.isDateIncomplete = this.kendoDateObject.hasValue() && this.value === null;
|
|
7623
|
+
if (previousValue === this.isDateIncomplete || !this.incompleteDateValidation) {
|
|
7624
|
+
return;
|
|
7625
|
+
}
|
|
7626
|
+
if (isPresent(this.ngControl) && !isPresent(this.pickerService)) {
|
|
7627
|
+
this.cdr.markForCheck();
|
|
7628
|
+
this.ngZone.run(() => this.onValidatorChange());
|
|
7629
|
+
}
|
|
7630
|
+
else if (isPresent(this.pickerService)) {
|
|
7631
|
+
this.pickerService.dateCompletenessChange.emit();
|
|
7902
7632
|
}
|
|
7903
7633
|
}
|
|
7904
7634
|
ngAfterViewInit() {
|
|
@@ -7954,16 +7684,18 @@ class DateInputComponent {
|
|
|
7954
7684
|
* @hidden
|
|
7955
7685
|
*/
|
|
7956
7686
|
writeValue(value) {
|
|
7687
|
+
var _a, _b, _c;
|
|
7957
7688
|
this.verifyValue(value);
|
|
7958
|
-
this.kendoDate = this.getKendoDate(value);
|
|
7959
7689
|
this.value = cloneDate(value);
|
|
7960
|
-
this.
|
|
7690
|
+
(_a = this.kendoDate) === null || _a === void 0 ? void 0 : _a.setOptions(this.options, true);
|
|
7691
|
+
(_b = this.kendoDateObject) === null || _b === void 0 ? void 0 : _b.setValue(this.value);
|
|
7692
|
+
(_c = this.kendoDate) === null || _c === void 0 ? void 0 : _c.refreshElementValue();
|
|
7961
7693
|
}
|
|
7962
7694
|
/**
|
|
7963
7695
|
* @hidden
|
|
7964
7696
|
*/
|
|
7965
7697
|
triggerChange() {
|
|
7966
|
-
const value = this.kendoDate.
|
|
7698
|
+
const value = this.kendoDate.value;
|
|
7967
7699
|
if (+value !== +this.value) {
|
|
7968
7700
|
this.value = cloneDate(value);
|
|
7969
7701
|
this.notify();
|
|
@@ -8006,11 +7738,7 @@ class DateInputComponent {
|
|
|
8006
7738
|
* ```
|
|
8007
7739
|
*/
|
|
8008
7740
|
focus() {
|
|
8009
|
-
|
|
8010
|
-
if (input) {
|
|
8011
|
-
input.focus();
|
|
8012
|
-
this.selectDateSegment(this.currentFormat[0]);
|
|
8013
|
-
}
|
|
7741
|
+
this.kendoDate && this.kendoDate.focus();
|
|
8014
7742
|
}
|
|
8015
7743
|
/**
|
|
8016
7744
|
* Blurs the DateInput component.
|
|
@@ -8026,220 +7754,50 @@ class DateInputComponent {
|
|
|
8026
7754
|
*/
|
|
8027
7755
|
handleButtonClick(offset) {
|
|
8028
7756
|
this.arrowDirection = Arrow.None;
|
|
8029
|
-
this.
|
|
7757
|
+
this.kendoDate.focus();
|
|
7758
|
+
this.kendoDate.modifyDateSegmentValue(offset);
|
|
7759
|
+
}
|
|
7760
|
+
initKendoDate() {
|
|
7761
|
+
const kendoDate = new DateInput(this.dateInput.nativeElement, Object.assign(Object.assign({}, this.options), { events: {
|
|
7762
|
+
valueChange: this.onWidgetValueChange.bind(this),
|
|
7763
|
+
inputEnd: this.onWidgetInputEnd.bind(this),
|
|
7764
|
+
focusEnd: this.onWidgetFocus.bind(this),
|
|
7765
|
+
blurEnd: this.onWidgetBlur.bind(this),
|
|
7766
|
+
keydown: this.onWidgetKeyDown.bind(this),
|
|
7767
|
+
} }));
|
|
7768
|
+
return kendoDate;
|
|
8030
7769
|
}
|
|
8031
|
-
|
|
8032
|
-
* @hidden
|
|
8033
|
-
*/
|
|
8034
|
-
modifyDateSegmentValue(offset) {
|
|
8035
|
-
const caret = this.caret();
|
|
8036
|
-
const symbol = this.currentFormat[caret[0]];
|
|
8037
|
-
let step = (this.steps || {})[this.symbolsMap[symbol]] || 1;
|
|
8038
|
-
if (symbol === "S" && !this.steps.millisecond) {
|
|
8039
|
-
const msDigits = millisecondDigitsInFormat(this.inputFormat);
|
|
8040
|
-
step = millisecondStepFor(msDigits);
|
|
8041
|
-
}
|
|
8042
|
-
this.kendoDate.modifyPart(symbol, offset * step);
|
|
8043
|
-
this.putDateInRange();
|
|
8044
|
-
this.updateElementValue(this.isActive);
|
|
7770
|
+
onWidgetValueChange() {
|
|
8045
7771
|
this.triggerChange();
|
|
8046
|
-
this.selectDateSegment(symbol);
|
|
8047
|
-
this.updateIncompleteValidationStatus();
|
|
8048
7772
|
}
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
*/
|
|
8052
|
-
switchDateSegment(offset) {
|
|
8053
|
-
const caret = this.caret();
|
|
8054
|
-
if (this.kendoDate.resetLeadingZero()) {
|
|
8055
|
-
this.updateElementValue(this.isActive);
|
|
8056
|
-
}
|
|
8057
|
-
if (caret[0] < caret[1] && this.currentFormat[caret[0]] !== this.currentFormat[caret[1] - 1]) {
|
|
8058
|
-
this.selectNearestSegment(offset > 0 ? caret[0] : caret[1] - 1);
|
|
8059
|
-
this.resetSegmentValue = true;
|
|
8060
|
-
return true;
|
|
8061
|
-
}
|
|
8062
|
-
const previousFormatSymbol = this.currentFormat[caret[0]];
|
|
8063
|
-
let a = caret[0] + offset;
|
|
8064
|
-
while (a > 0 && a < this.currentFormat.length) {
|
|
8065
|
-
if (this.currentFormat[a] !== previousFormatSymbol &&
|
|
8066
|
-
this.currentFormat[a] !== "_") {
|
|
8067
|
-
break;
|
|
8068
|
-
}
|
|
8069
|
-
a += offset;
|
|
8070
|
-
}
|
|
8071
|
-
if (this.currentFormat[a] === "_") {
|
|
8072
|
-
//there is not known symbol found
|
|
8073
|
-
return false;
|
|
8074
|
-
}
|
|
8075
|
-
let b = a;
|
|
8076
|
-
while (b >= 0 && b < this.currentFormat.length) {
|
|
8077
|
-
if (this.currentFormat[b] !== this.currentFormat[a]) {
|
|
8078
|
-
break;
|
|
8079
|
-
}
|
|
8080
|
-
b += offset;
|
|
8081
|
-
}
|
|
8082
|
-
if (a > b && (b + 1 !== caret[0] || a + 1 !== caret[1])) {
|
|
8083
|
-
this.caret(b + 1, a + 1);
|
|
8084
|
-
this.resetSegmentValue = true;
|
|
8085
|
-
return true;
|
|
8086
|
-
}
|
|
8087
|
-
else if (a < b && (a !== caret[0] || b !== caret[1])) {
|
|
8088
|
-
this.caret(a, b);
|
|
8089
|
-
this.resetSegmentValue = true;
|
|
8090
|
-
return true;
|
|
8091
|
-
}
|
|
8092
|
-
return false;
|
|
8093
|
-
}
|
|
8094
|
-
/**
|
|
8095
|
-
* @hidden
|
|
8096
|
-
*/
|
|
8097
|
-
selectDateSegment(symbol) {
|
|
8098
|
-
let begin = -1;
|
|
8099
|
-
let end = 0;
|
|
8100
|
-
for (let i = 0; i < this.currentFormat.length; i++) {
|
|
8101
|
-
if (this.currentFormat[i] === symbol) {
|
|
8102
|
-
end = i + 1;
|
|
8103
|
-
if (begin === -1) {
|
|
8104
|
-
begin = i;
|
|
8105
|
-
}
|
|
8106
|
-
}
|
|
8107
|
-
}
|
|
8108
|
-
if (begin < 0) {
|
|
8109
|
-
begin = 0;
|
|
8110
|
-
}
|
|
8111
|
-
this.caret(0, 0);
|
|
8112
|
-
this.caret(begin, end);
|
|
8113
|
-
}
|
|
8114
|
-
/**
|
|
8115
|
-
* @hidden
|
|
8116
|
-
*/
|
|
8117
|
-
handleClick() {
|
|
8118
|
-
this.hasMousedown = false;
|
|
8119
|
-
if (this.isActive) {
|
|
8120
|
-
const selectionPresent = this.inputElement.selectionStart !== this.inputElement.selectionEnd;
|
|
8121
|
-
const placeholderToggled = isPresent(this.placeholder) && !this.kendoDate.hasValue() && !this.focusedPriorToMousedown;
|
|
8122
|
-
// focus first segment if the user hasn't selected something during mousedown and if the placeholder was just toggled
|
|
8123
|
-
const selectFirstSegment = !selectionPresent && placeholderToggled;
|
|
8124
|
-
const index = selectFirstSegment ? 0 : this.caret()[0];
|
|
8125
|
-
this.selectNearestSegment(index);
|
|
8126
|
-
}
|
|
8127
|
-
}
|
|
8128
|
-
/**
|
|
8129
|
-
* @hidden
|
|
8130
|
-
*/
|
|
8131
|
-
handleDragAndDrop(args) {
|
|
8132
|
-
args.preventDefault();
|
|
7773
|
+
onWidgetKeyDown() {
|
|
7774
|
+
this.kendoDateObject = this.kendoDate.dateObject;
|
|
8133
7775
|
}
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
*/
|
|
8137
|
-
handleMousedown() {
|
|
8138
|
-
this.hasMousedown = true;
|
|
8139
|
-
this.focusedPriorToMousedown = this.isActive;
|
|
7776
|
+
onWidgetInputEnd() {
|
|
7777
|
+
this.updateIncompleteValidationStatus();
|
|
8140
7778
|
}
|
|
8141
|
-
|
|
8142
|
-
* @hidden
|
|
8143
|
-
*/
|
|
8144
|
-
handleFocus(args) {
|
|
8145
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
7779
|
+
onWidgetFocus({ event: FocuseEvent }) {
|
|
8146
7780
|
this.isActive = true;
|
|
8147
|
-
this.updateElementValue();
|
|
8148
|
-
if (!this.hasMousedown) {
|
|
8149
|
-
this.caret(0, this.inputValue.length);
|
|
8150
|
-
}
|
|
8151
|
-
this.hasMousedown = false;
|
|
8152
7781
|
if (hasObservers(this.onFocus)) {
|
|
8153
7782
|
this.ngZone.run(() => {
|
|
8154
|
-
this.emitFocus(
|
|
7783
|
+
this.emitFocus(event);
|
|
8155
7784
|
});
|
|
8156
7785
|
}
|
|
8157
7786
|
else {
|
|
8158
|
-
this.emitFocus(
|
|
7787
|
+
this.emitFocus(event);
|
|
8159
7788
|
}
|
|
8160
7789
|
}
|
|
8161
|
-
|
|
8162
|
-
* @hidden
|
|
8163
|
-
*/
|
|
8164
|
-
handleBlur(args) {
|
|
7790
|
+
onWidgetBlur({ event: FocuseEvent }) {
|
|
8165
7791
|
this.isActive = false;
|
|
8166
|
-
this.resetSegmentValue = true;
|
|
8167
|
-
this.kendoDate.resetLeadingZero();
|
|
8168
|
-
this.updateElementValue();
|
|
8169
7792
|
if (hasObservers(this.onBlur) || requiresZoneOnBlur(this.ngControl)) {
|
|
8170
7793
|
this.ngZone.run(() => {
|
|
8171
7794
|
this.onControlTouched();
|
|
8172
|
-
this.emitBlur(
|
|
7795
|
+
this.emitBlur(event);
|
|
8173
7796
|
this.cdr.markForCheck();
|
|
8174
7797
|
});
|
|
8175
7798
|
}
|
|
8176
7799
|
else {
|
|
8177
|
-
this.emitBlur(
|
|
8178
|
-
}
|
|
8179
|
-
}
|
|
8180
|
-
getKendoDate(value) {
|
|
8181
|
-
const { leadingZero } = (this.kendoDate || {}) || null;
|
|
8182
|
-
const kendoDate = new KendoDate(this.intl, this.formatPlaceholder, this.inputFormat, value, this.twoDigitYearMax);
|
|
8183
|
-
kendoDate.setLeadingZero(this.isActive ? leadingZero : null);
|
|
8184
|
-
return kendoDate;
|
|
8185
|
-
}
|
|
8186
|
-
dateSymbolMap() {
|
|
8187
|
-
const reducer = (map, part) => {
|
|
8188
|
-
map[part.pattern[0]] = part.type;
|
|
8189
|
-
return map;
|
|
8190
|
-
};
|
|
8191
|
-
return this.intl.splitDateFormat(this.inputFormat).reduce(reducer, {});
|
|
8192
|
-
}
|
|
8193
|
-
updateElementValue(isActive) {
|
|
8194
|
-
const start = this.caret()[0]; //XXX: get caret position before input is updated
|
|
8195
|
-
const format = this.isActive ? this.inputFormat : this.displayFormat;
|
|
8196
|
-
const texts = this.kendoDate.getTextAndFormat(format);
|
|
8197
|
-
const showPlaceholder = !this.isActive && isPresent(this.placeholder) && !this.kendoDate.hasValue();
|
|
8198
|
-
const input = this.inputElement;
|
|
8199
|
-
this.currentFormat = texts[1];
|
|
8200
|
-
this.currentValue = !showPlaceholder ? texts[0] : '';
|
|
8201
|
-
this.renderer.setProperty(input, "value", this.currentValue);
|
|
8202
|
-
if (input.placeholder !== this.placeholder) {
|
|
8203
|
-
this.renderer.setProperty(input, "placeholder", this.placeholder);
|
|
8204
|
-
}
|
|
8205
|
-
if (isActive) {
|
|
8206
|
-
this.selectNearestSegment(start);
|
|
8207
|
-
}
|
|
8208
|
-
}
|
|
8209
|
-
caret(start, end = start) {
|
|
8210
|
-
const isPosition = start !== undefined;
|
|
8211
|
-
let returnValue = [start, start];
|
|
8212
|
-
const element = this.inputElement;
|
|
8213
|
-
if (isPosition && (this.disabled || this.readonly)) {
|
|
8214
|
-
return undefined;
|
|
8215
|
-
}
|
|
8216
|
-
try {
|
|
8217
|
-
if (element.selectionStart !== undefined) {
|
|
8218
|
-
if (isPosition) {
|
|
8219
|
-
if (isDocumentAvailable() && document.activeElement !== element) {
|
|
8220
|
-
element.focus();
|
|
8221
|
-
}
|
|
8222
|
-
element.setSelectionRange(start, end);
|
|
8223
|
-
}
|
|
8224
|
-
returnValue = [element.selectionStart, element.selectionEnd];
|
|
8225
|
-
}
|
|
8226
|
-
}
|
|
8227
|
-
catch (e) {
|
|
8228
|
-
returnValue = [];
|
|
8229
|
-
}
|
|
8230
|
-
return returnValue;
|
|
8231
|
-
}
|
|
8232
|
-
selectNearestSegment(index) {
|
|
8233
|
-
// Finds the nearest (in both directions) known part.
|
|
8234
|
-
for (let i = index, j = index - 1; i < this.currentFormat.length || j >= 0; i++, j--) {
|
|
8235
|
-
if (i < this.currentFormat.length && this.currentFormat[i] !== "_") {
|
|
8236
|
-
this.selectDateSegment(this.currentFormat[i]);
|
|
8237
|
-
return;
|
|
8238
|
-
}
|
|
8239
|
-
if (j >= 0 && this.currentFormat[j] !== "_") {
|
|
8240
|
-
this.selectDateSegment(this.currentFormat[j]);
|
|
8241
|
-
return;
|
|
8242
|
-
}
|
|
7800
|
+
this.emitBlur(event);
|
|
8243
7801
|
}
|
|
8244
7802
|
}
|
|
8245
7803
|
verifyRange() {
|
|
@@ -8258,135 +7816,9 @@ class DateInputComponent {
|
|
|
8258
7816
|
throw new Error(`The 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK$3} for possible resolution.`);
|
|
8259
7817
|
}
|
|
8260
7818
|
}
|
|
8261
|
-
putDateInRange() {
|
|
8262
|
-
const currentDate = this.kendoDate.getDateObject();
|
|
8263
|
-
const candidate = dateInRange(currentDate, this.min, this.max);
|
|
8264
|
-
if (this.autoCorrect && !isEqual(currentDate, candidate)) {
|
|
8265
|
-
this.kendoDate = this.getKendoDate(candidate);
|
|
8266
|
-
}
|
|
8267
|
-
}
|
|
8268
|
-
updateFormatSections() {
|
|
8269
|
-
this.formatSections = this.intl.splitDateFormat(this.inputFormat)
|
|
8270
|
-
.reduce(({ date, time }, p) => {
|
|
8271
|
-
return {
|
|
8272
|
-
date: date || DATE_PART_REGEXP.test(p.type),
|
|
8273
|
-
time: time || TIME_PART_REGEXP.test(p.type)
|
|
8274
|
-
};
|
|
8275
|
-
}, { date: false, time: false });
|
|
8276
|
-
}
|
|
8277
7819
|
intlChange() {
|
|
7820
|
+
this.kendoDate.setOptions(this.options, true);
|
|
8278
7821
|
this.updateFormatSections();
|
|
8279
|
-
this.kendoDate = this.getKendoDate(this.value);
|
|
8280
|
-
this.updateElementValue(this.isActive);
|
|
8281
|
-
}
|
|
8282
|
-
updateOnPaste() {
|
|
8283
|
-
let value = this.intl.parseDate(this.inputValue, this.inputFormat) || this.value;
|
|
8284
|
-
if (isPresent(value) && this.kendoDate.shouldNormalizeCentury()) {
|
|
8285
|
-
value = this.kendoDate.normalizeCentury(value);
|
|
8286
|
-
}
|
|
8287
|
-
const notify = +value !== +this.value;
|
|
8288
|
-
this.writeValue(value);
|
|
8289
|
-
if (notify) {
|
|
8290
|
-
this.notify();
|
|
8291
|
-
}
|
|
8292
|
-
}
|
|
8293
|
-
bindEvents() {
|
|
8294
|
-
const element = this.wrapper.nativeElement;
|
|
8295
|
-
const mousewheelHandler = this.handleMouseWheel.bind(this);
|
|
8296
|
-
this.domEvents.push(this.renderer.listen(element, 'DOMMouseScroll', mousewheelHandler), this.renderer.listen(element, 'mousewheel', mousewheelHandler), this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)), this.renderer.listen(element, 'paste', this.handlePaste.bind(this)), this.renderer.listen(element, 'input', this.handleInput.bind(this)));
|
|
8297
|
-
}
|
|
8298
|
-
handleMouseWheel(event) {
|
|
8299
|
-
if (this.disabled || this.readonly || !this.isActive) {
|
|
8300
|
-
return;
|
|
8301
|
-
}
|
|
8302
|
-
event = window.event || event;
|
|
8303
|
-
if (event.shiftKey) {
|
|
8304
|
-
this.switchDateSegment((event.wheelDelta || -event.detail) > 0 ? -1 : 1);
|
|
8305
|
-
}
|
|
8306
|
-
else {
|
|
8307
|
-
this.modifyDateSegmentValue((event.wheelDelta || -event.detail) > 0 ? 1 : -1);
|
|
8308
|
-
}
|
|
8309
|
-
event.returnValue = false;
|
|
8310
|
-
if (event.preventDefault) {
|
|
8311
|
-
event.preventDefault();
|
|
8312
|
-
}
|
|
8313
|
-
if (event.stopPropagation) {
|
|
8314
|
-
event.stopPropagation();
|
|
8315
|
-
}
|
|
8316
|
-
}
|
|
8317
|
-
handlePaste() {
|
|
8318
|
-
this.paste = true;
|
|
8319
|
-
}
|
|
8320
|
-
handleKeydown(event) {
|
|
8321
|
-
if (this.disabled || this.readonly || event.altKey || event.ctrlKey || event.metaKey) {
|
|
8322
|
-
return;
|
|
8323
|
-
}
|
|
8324
|
-
if (event.keyCode === Keys$1.Backspace) {
|
|
8325
|
-
this.backspace = true;
|
|
8326
|
-
return;
|
|
8327
|
-
}
|
|
8328
|
-
switch (event.keyCode) {
|
|
8329
|
-
case Keys$1.ArrowDown:
|
|
8330
|
-
this.modifyDateSegmentValue(-1);
|
|
8331
|
-
break;
|
|
8332
|
-
case Keys$1.ArrowUp:
|
|
8333
|
-
this.modifyDateSegmentValue(1);
|
|
8334
|
-
break;
|
|
8335
|
-
case Keys$1.ArrowRight:
|
|
8336
|
-
this.switchDateSegment(1);
|
|
8337
|
-
break;
|
|
8338
|
-
case Keys$1.ArrowLeft:
|
|
8339
|
-
this.switchDateSegment(-1);
|
|
8340
|
-
break;
|
|
8341
|
-
case Keys$1.Home:
|
|
8342
|
-
this.selectNearestSegment(0);
|
|
8343
|
-
break;
|
|
8344
|
-
case Keys$1.End:
|
|
8345
|
-
this.selectNearestSegment(this.inputValue.length);
|
|
8346
|
-
break;
|
|
8347
|
-
default:
|
|
8348
|
-
return; //skip the preventDefault if we didn't handled the keyCode
|
|
8349
|
-
}
|
|
8350
|
-
event.preventDefault();
|
|
8351
|
-
}
|
|
8352
|
-
handleInput() {
|
|
8353
|
-
if (this.disabled || this.readonly) {
|
|
8354
|
-
return;
|
|
8355
|
-
}
|
|
8356
|
-
if (this.paste) {
|
|
8357
|
-
this.updateOnPaste();
|
|
8358
|
-
this.paste = false;
|
|
8359
|
-
return;
|
|
8360
|
-
}
|
|
8361
|
-
const diff = approximateStringMatching(this.currentValue, this.currentFormat, this.inputValue, this.caret()[0]);
|
|
8362
|
-
const navigationOnly = (diff.length === 1 && diff[0][1] === "_");
|
|
8363
|
-
let switchPart = false;
|
|
8364
|
-
if (!navigationOnly) {
|
|
8365
|
-
let parsedPart;
|
|
8366
|
-
for (let i = 0; i < diff.length; i++) {
|
|
8367
|
-
parsedPart = this.kendoDate.parsePart(diff[i][0], diff[i][1], this.resetSegmentValue);
|
|
8368
|
-
switchPart = parsedPart.switchToNext;
|
|
8369
|
-
}
|
|
8370
|
-
const candidate = this.kendoDate.getDateObject();
|
|
8371
|
-
if (this.value && candidate && !this.formatSections['date']) {
|
|
8372
|
-
this.kendoDate = this.getKendoDate(setTime(this.value, candidate));
|
|
8373
|
-
}
|
|
8374
|
-
}
|
|
8375
|
-
this.resetSegmentValue = false;
|
|
8376
|
-
this.putDateInRange();
|
|
8377
|
-
this.updateElementValue(this.isActive);
|
|
8378
|
-
this.triggerChange();
|
|
8379
|
-
this.updateIncompleteValidationStatus();
|
|
8380
|
-
if (diff.length && diff[0][0] !== "_") {
|
|
8381
|
-
this.selectDateSegment(diff[0][0]);
|
|
8382
|
-
}
|
|
8383
|
-
if (switchPart || navigationOnly) {
|
|
8384
|
-
this.switchDateSegment(1);
|
|
8385
|
-
}
|
|
8386
|
-
if (this.backspace) {
|
|
8387
|
-
this.switchDateSegment(-1);
|
|
8388
|
-
}
|
|
8389
|
-
this.backspace = false;
|
|
8390
7822
|
}
|
|
8391
7823
|
emitFocus(args) {
|
|
8392
7824
|
this.onFocus.emit();
|
|
@@ -8400,20 +7832,6 @@ class DateInputComponent {
|
|
|
8400
7832
|
this.pickerService.onBlur.emit(args);
|
|
8401
7833
|
}
|
|
8402
7834
|
}
|
|
8403
|
-
updateIncompleteValidationStatus() {
|
|
8404
|
-
const previousValue = this.isDateIncomplete;
|
|
8405
|
-
this.isDateIncomplete = this.kendoDate.hasValue() && this.value === null;
|
|
8406
|
-
if (previousValue === this.isDateIncomplete || !this.incompleteDateValidation) {
|
|
8407
|
-
return;
|
|
8408
|
-
}
|
|
8409
|
-
if (isPresent(this.ngControl) && !isPresent(this.pickerService)) {
|
|
8410
|
-
this.cdr.markForCheck();
|
|
8411
|
-
this.ngZone.run(() => this.onValidatorChange());
|
|
8412
|
-
}
|
|
8413
|
-
else if (isPresent(this.pickerService)) {
|
|
8414
|
-
this.pickerService.dateCompletenessChange.emit();
|
|
8415
|
-
}
|
|
8416
|
-
}
|
|
8417
7835
|
setSpinnerFill(spinner, fill, oldFill) {
|
|
8418
7836
|
if (oldFill !== 'none') {
|
|
8419
7837
|
this.renderer.removeClass(spinner, `k-button-${oldFill}`);
|
|
@@ -8439,7 +7857,7 @@ class DateInputComponent {
|
|
|
8439
7857
|
}
|
|
8440
7858
|
}
|
|
8441
7859
|
DateInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.IntlService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i1$1.LocalizationService }, { token: PickerService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
8442
|
-
DateInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DateInputComponent, selector: "kendo-dateinput", inputs: { focusableId: "focusableId", pickerType: "pickerType", disabled: "disabled", readonly: "readonly", title: "title", tabindex: "tabindex", role: "role", ariaReadOnly: "ariaReadOnly", tabIndex: "tabIndex", format: "format", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", max: "max", min: "min", rangeValidation: "rangeValidation",
|
|
7860
|
+
DateInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DateInputComponent, selector: "kendo-dateinput", inputs: { focusableId: "focusableId", pickerType: "pickerType", disabled: "disabled", readonly: "readonly", title: "title", tabindex: "tabindex", role: "role", ariaReadOnly: "ariaReadOnly", tabIndex: "tabIndex", format: "format", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", max: "max", min: "min", rangeValidation: "rangeValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", allowCaretMode: "allowCaretMode", autoFill: "autoFill", incompleteDateValidation: "incompleteDateValidation", twoDigitYearMax: "twoDigitYearMax", enableMouseWheel: "enableMouseWheel", value: "value", spinners: "spinners", isPopupOpen: "isPopupOpen", hasPopup: "hasPopup", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", valueUpdate: "valueUpdate", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-input": "this.wrapperClass", "class.k-dateinput": "this.wrapperClass", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
8443
7861
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateInputComponent), multi: true },
|
|
8444
7862
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateInputComponent), multi: true },
|
|
8445
7863
|
{ provide: L10N_PREFIX, useValue: 'kendo.dateinput' },
|
|
@@ -8472,13 +7890,8 @@ DateInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
8472
7890
|
[attr.aria-expanded]="isPopupOpen"
|
|
8473
7891
|
[attr.aria-haspopup]="hasPopup"
|
|
8474
7892
|
[kendoEventsOutsideAngular]="{
|
|
8475
|
-
click: handleClick,
|
|
8476
|
-
focus: handleFocus,
|
|
8477
|
-
mousedown: handleMousedown,
|
|
8478
|
-
touchstart: handleMousedown,
|
|
8479
7893
|
dragstart: handleDragAndDrop,
|
|
8480
|
-
drop: handleDragAndDrop
|
|
8481
|
-
blur: handleBlur
|
|
7894
|
+
drop: handleDragAndDrop
|
|
8482
7895
|
}"
|
|
8483
7896
|
[scope]="this"
|
|
8484
7897
|
/>
|
|
@@ -8561,13 +7974,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
8561
7974
|
[attr.aria-expanded]="isPopupOpen"
|
|
8562
7975
|
[attr.aria-haspopup]="hasPopup"
|
|
8563
7976
|
[kendoEventsOutsideAngular]="{
|
|
8564
|
-
click: handleClick,
|
|
8565
|
-
focus: handleFocus,
|
|
8566
|
-
mousedown: handleMousedown,
|
|
8567
|
-
touchstart: handleMousedown,
|
|
8568
7977
|
dragstart: handleDragAndDrop,
|
|
8569
|
-
drop: handleDragAndDrop
|
|
8570
|
-
blur: handleBlur
|
|
7978
|
+
drop: handleDragAndDrop
|
|
8571
7979
|
}"
|
|
8572
7980
|
[scope]="this"
|
|
8573
7981
|
/>
|
|
@@ -8647,12 +8055,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
8647
8055
|
type: Input
|
|
8648
8056
|
}], rangeValidation: [{
|
|
8649
8057
|
type: Input
|
|
8650
|
-
}],
|
|
8058
|
+
}], autoCorrectParts: [{
|
|
8059
|
+
type: Input
|
|
8060
|
+
}], autoSwitchParts: [{
|
|
8061
|
+
type: Input
|
|
8062
|
+
}], autoSwitchKeys: [{
|
|
8063
|
+
type: Input
|
|
8064
|
+
}], allowCaretMode: [{
|
|
8065
|
+
type: Input
|
|
8066
|
+
}], autoFill: [{
|
|
8651
8067
|
type: Input
|
|
8652
8068
|
}], incompleteDateValidation: [{
|
|
8653
8069
|
type: Input
|
|
8654
8070
|
}], twoDigitYearMax: [{
|
|
8655
8071
|
type: Input
|
|
8072
|
+
}], enableMouseWheel: [{
|
|
8073
|
+
type: Input
|
|
8656
8074
|
}], value: [{
|
|
8657
8075
|
type: Input
|
|
8658
8076
|
}], spinners: [{
|
|
@@ -8924,6 +8342,43 @@ class DatePickerComponent {
|
|
|
8924
8342
|
* Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
8925
8343
|
*/
|
|
8926
8344
|
this.incompleteDateValidation = false;
|
|
8345
|
+
/**
|
|
8346
|
+
* @hidden
|
|
8347
|
+
*
|
|
8348
|
+
* Determines whether to auto correct invalid segments automatically.
|
|
8349
|
+
* TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
|
|
8350
|
+
*
|
|
8351
|
+
* @default true
|
|
8352
|
+
*/
|
|
8353
|
+
this.autoCorrectParts = true;
|
|
8354
|
+
/**
|
|
8355
|
+
* Determines whether to automatically move to the next segment after the user completes the current one.
|
|
8356
|
+
*
|
|
8357
|
+
* @default true
|
|
8358
|
+
*/
|
|
8359
|
+
this.autoSwitchParts = true;
|
|
8360
|
+
/**
|
|
8361
|
+
* A string array representing custom keys, which will move the focus to the next date format segment.
|
|
8362
|
+
*/
|
|
8363
|
+
this.autoSwitchKeys = [];
|
|
8364
|
+
/**
|
|
8365
|
+
* Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
|
|
8366
|
+
*
|
|
8367
|
+
* @default true
|
|
8368
|
+
*/
|
|
8369
|
+
this.enableMouseWheel = true;
|
|
8370
|
+
/**
|
|
8371
|
+
* Determines if the users should see a blinking caret inside the Date Input when possible.
|
|
8372
|
+
*
|
|
8373
|
+
* @default false
|
|
8374
|
+
*/
|
|
8375
|
+
this.allowCaretMode = false;
|
|
8376
|
+
/**
|
|
8377
|
+
* When enabled, the DatePicker will autofill the rest of the date to the current date when the component loses focus.
|
|
8378
|
+
*
|
|
8379
|
+
* @default false
|
|
8380
|
+
*/
|
|
8381
|
+
this.autoFill = false;
|
|
8927
8382
|
/**
|
|
8928
8383
|
* Specifies the focused date of the Calendar component
|
|
8929
8384
|
* ([see example]({% slug calendar_type_datepicker %}#toc-focused-dates)).
|
|
@@ -9825,7 +9280,7 @@ class DatePickerComponent {
|
|
|
9825
9280
|
}
|
|
9826
9281
|
}
|
|
9827
9282
|
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DatePickerComponent, deps: [{ token: i0.NgZone }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i1$2.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: PickerService }, { token: DisabledDatesService }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
9828
|
-
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DatePickerComponent, selector: "kendo-datepicker", inputs: { focusableId: "focusableId", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], activeView: "activeView", bottomView: "bottomView", topView: "topView", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", popupSettings: "popupSettings", navigation: "navigation", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", focusedDate: "focusedDate", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", title: "title", subtitle: "subtitle", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", weekNumber: "weekNumber", size: "size", rounded: "rounded", fillMode: "fillMode", adaptiveMode: "adaptiveMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { properties: { "class.k-datepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
9283
|
+
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DatePickerComponent, selector: "kendo-datepicker", inputs: { focusableId: "focusableId", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], activeView: "activeView", bottomView: "bottomView", topView: "topView", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", popupSettings: "popupSettings", navigation: "navigation", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", enableMouseWheel: "enableMouseWheel", allowCaretMode: "allowCaretMode", autoFill: "autoFill", focusedDate: "focusedDate", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", title: "title", subtitle: "subtitle", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", weekNumber: "weekNumber", size: "size", rounded: "rounded", fillMode: "fillMode", adaptiveMode: "adaptiveMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { properties: { "class.k-datepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
9829
9284
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true },
|
|
9830
9285
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DatePickerComponent), multi: true },
|
|
9831
9286
|
{ provide: KendoInput, useExisting: forwardRef(() => DatePickerComponent) },
|
|
@@ -9873,6 +9328,12 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
9873
9328
|
[min]="min"
|
|
9874
9329
|
[max]="max"
|
|
9875
9330
|
[incompleteDateValidation]="incompleteDateValidation"
|
|
9331
|
+
[autoCorrectParts]="autoCorrectParts"
|
|
9332
|
+
[autoSwitchParts]="autoSwitchParts"
|
|
9333
|
+
[autoSwitchKeys]="autoSwitchKeys"
|
|
9334
|
+
[enableMouseWheel]="enableMouseWheel"
|
|
9335
|
+
[allowCaretMode]="allowCaretMode"
|
|
9336
|
+
[autoFill]="autoFill"
|
|
9876
9337
|
fillMode="none"
|
|
9877
9338
|
rounded="none"
|
|
9878
9339
|
size="none"
|
|
@@ -9986,7 +9447,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
9986
9447
|
</kendo-calendar-messages>
|
|
9987
9448
|
</kendo-calendar>
|
|
9988
9449
|
</ng-template>
|
|
9989
|
-
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "
|
|
9450
|
+
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "size"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }], directives: [{ type: DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9990
9451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
9991
9452
|
type: Component,
|
|
9992
9453
|
args: [{
|
|
@@ -10042,6 +9503,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
10042
9503
|
[min]="min"
|
|
10043
9504
|
[max]="max"
|
|
10044
9505
|
[incompleteDateValidation]="incompleteDateValidation"
|
|
9506
|
+
[autoCorrectParts]="autoCorrectParts"
|
|
9507
|
+
[autoSwitchParts]="autoSwitchParts"
|
|
9508
|
+
[autoSwitchKeys]="autoSwitchKeys"
|
|
9509
|
+
[enableMouseWheel]="enableMouseWheel"
|
|
9510
|
+
[allowCaretMode]="allowCaretMode"
|
|
9511
|
+
[autoFill]="autoFill"
|
|
10045
9512
|
fillMode="none"
|
|
10046
9513
|
rounded="none"
|
|
10047
9514
|
size="none"
|
|
@@ -10252,6 +9719,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
10252
9719
|
type: Input
|
|
10253
9720
|
}], incompleteDateValidation: [{
|
|
10254
9721
|
type: Input
|
|
9722
|
+
}], autoCorrectParts: [{
|
|
9723
|
+
type: Input
|
|
9724
|
+
}], autoSwitchParts: [{
|
|
9725
|
+
type: Input
|
|
9726
|
+
}], autoSwitchKeys: [{
|
|
9727
|
+
type: Input
|
|
9728
|
+
}], enableMouseWheel: [{
|
|
9729
|
+
type: Input
|
|
9730
|
+
}], allowCaretMode: [{
|
|
9731
|
+
type: Input
|
|
9732
|
+
}], autoFill: [{
|
|
9733
|
+
type: Input
|
|
10255
9734
|
}], focusedDate: [{
|
|
10256
9735
|
type: Input
|
|
10257
9736
|
}], value: [{
|
|
@@ -12241,6 +11720,37 @@ class TimePickerComponent {
|
|
|
12241
11720
|
* Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
12242
11721
|
*/
|
|
12243
11722
|
this.incompleteDateValidation = false;
|
|
11723
|
+
/**
|
|
11724
|
+
* @hidden
|
|
11725
|
+
*
|
|
11726
|
+
* Determines whether to auto correct invalid segments automatically.
|
|
11727
|
+
* TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
|
|
11728
|
+
*
|
|
11729
|
+
* @default true
|
|
11730
|
+
*/
|
|
11731
|
+
this.autoCorrectParts = true;
|
|
11732
|
+
/**
|
|
11733
|
+
* Determines whether to automatically move to the next segment after the user completes the current one.
|
|
11734
|
+
*
|
|
11735
|
+
* @default true
|
|
11736
|
+
*/
|
|
11737
|
+
this.autoSwitchParts = true;
|
|
11738
|
+
/**
|
|
11739
|
+
* A string array representing custom keys, which will move the focus to the next date format segment.
|
|
11740
|
+
*/
|
|
11741
|
+
this.autoSwitchKeys = [];
|
|
11742
|
+
/**
|
|
11743
|
+
* Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
|
|
11744
|
+
*
|
|
11745
|
+
* @default true
|
|
11746
|
+
*/
|
|
11747
|
+
this.enableMouseWheel = true;
|
|
11748
|
+
/**
|
|
11749
|
+
* Determines if the users should see a blinking caret inside the Date Input when possible.
|
|
11750
|
+
*
|
|
11751
|
+
* @default false
|
|
11752
|
+
*/
|
|
11753
|
+
this.allowCaretMode = false;
|
|
12244
11754
|
/**
|
|
12245
11755
|
* Determines whether to display the **Cancel** button in the popup.
|
|
12246
11756
|
*/
|
|
@@ -13093,7 +12603,7 @@ class TimePickerComponent {
|
|
|
13093
12603
|
}
|
|
13094
12604
|
}
|
|
13095
12605
|
TimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimePickerComponent, deps: [{ token: BusViewService }, { token: i0.NgZone }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i1$2.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: PickerService }, { token: i1.IntlService }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
13096
|
-
TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimePickerComponent, selector: "kendo-timepicker", inputs: { focusableId: "focusableId", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", format: "format", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", cancelButton: "cancelButton", nowButton: "nowButton", steps: "steps", popupSettings: "popupSettings", tabindex: "tabindex", tabIndex: "tabIndex", title: "title", subtitle: "subtitle", rangeValidation: "rangeValidation", adaptiveMode: "adaptiveMode", value: "value", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { properties: { "class.k-timepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
12606
|
+
TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimePickerComponent, selector: "kendo-timepicker", inputs: { focusableId: "focusableId", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", format: "format", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", enableMouseWheel: "enableMouseWheel", allowCaretMode: "allowCaretMode", cancelButton: "cancelButton", nowButton: "nowButton", steps: "steps", popupSettings: "popupSettings", tabindex: "tabindex", tabIndex: "tabIndex", title: "title", subtitle: "subtitle", rangeValidation: "rangeValidation", adaptiveMode: "adaptiveMode", value: "value", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { properties: { "class.k-timepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
13097
12607
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
13098
12608
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => TimePickerComponent), multi: true },
|
|
13099
12609
|
{ provide: KendoInput, useExisting: forwardRef(() => TimePickerComponent) },
|
|
@@ -13159,6 +12669,11 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
13159
12669
|
[min]="normalizeTime(min)"
|
|
13160
12670
|
[max]="normalizeTime(max)"
|
|
13161
12671
|
[incompleteDateValidation]="incompleteDateValidation"
|
|
12672
|
+
[autoCorrectParts]="autoCorrectParts"
|
|
12673
|
+
[autoSwitchParts]="autoSwitchParts"
|
|
12674
|
+
[autoSwitchKeys]="autoSwitchKeys"
|
|
12675
|
+
[enableMouseWheel]="enableMouseWheel"
|
|
12676
|
+
[allowCaretMode]="allowCaretMode"
|
|
13162
12677
|
[fillMode]="fillMode"
|
|
13163
12678
|
[rounded]="rounded"
|
|
13164
12679
|
[size]="size"
|
|
@@ -13288,7 +12803,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
13288
12803
|
</kendo-timeselector-messages>
|
|
13289
12804
|
</kendo-timeselector>
|
|
13290
12805
|
</ng-template>
|
|
13291
|
-
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "
|
|
12806
|
+
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13292
12807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
13293
12808
|
type: Component,
|
|
13294
12809
|
args: [{
|
|
@@ -13362,6 +12877,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
13362
12877
|
[min]="normalizeTime(min)"
|
|
13363
12878
|
[max]="normalizeTime(max)"
|
|
13364
12879
|
[incompleteDateValidation]="incompleteDateValidation"
|
|
12880
|
+
[autoCorrectParts]="autoCorrectParts"
|
|
12881
|
+
[autoSwitchParts]="autoSwitchParts"
|
|
12882
|
+
[autoSwitchKeys]="autoSwitchKeys"
|
|
12883
|
+
[enableMouseWheel]="enableMouseWheel"
|
|
12884
|
+
[allowCaretMode]="allowCaretMode"
|
|
13365
12885
|
[fillMode]="fillMode"
|
|
13366
12886
|
[rounded]="rounded"
|
|
13367
12887
|
[size]="size"
|
|
@@ -13532,6 +13052,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
13532
13052
|
type: Input
|
|
13533
13053
|
}], incompleteDateValidation: [{
|
|
13534
13054
|
type: Input
|
|
13055
|
+
}], autoCorrectParts: [{
|
|
13056
|
+
type: Input
|
|
13057
|
+
}], autoSwitchParts: [{
|
|
13058
|
+
type: Input
|
|
13059
|
+
}], autoSwitchKeys: [{
|
|
13060
|
+
type: Input
|
|
13061
|
+
}], enableMouseWheel: [{
|
|
13062
|
+
type: Input
|
|
13063
|
+
}], allowCaretMode: [{
|
|
13064
|
+
type: Input
|
|
13535
13065
|
}], cancelButton: [{
|
|
13536
13066
|
type: Input
|
|
13537
13067
|
}], nowButton: [{
|
|
@@ -13744,7 +13274,14 @@ class DateTimePickerComponent {
|
|
|
13744
13274
|
* Configures the incremental steps of the DateInput and the popup component of the TimePicker
|
|
13745
13275
|
* ([see example]({% slug incrementalsteps_datetimepicker %})).
|
|
13746
13276
|
*/
|
|
13747
|
-
this.steps = {
|
|
13277
|
+
this.steps = {
|
|
13278
|
+
second: 1,
|
|
13279
|
+
minute: 1,
|
|
13280
|
+
hour: 1,
|
|
13281
|
+
day: 1,
|
|
13282
|
+
month: 1,
|
|
13283
|
+
year: 1
|
|
13284
|
+
};
|
|
13748
13285
|
/**
|
|
13749
13286
|
* Specifies the Calendar type.
|
|
13750
13287
|
*
|
|
@@ -13783,6 +13320,43 @@ class DateTimePickerComponent {
|
|
|
13783
13320
|
* Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
13784
13321
|
*/
|
|
13785
13322
|
this.incompleteDateValidation = false;
|
|
13323
|
+
/**
|
|
13324
|
+
* @hidden
|
|
13325
|
+
*
|
|
13326
|
+
* Determines whether to auto correct invalid segments automatically.
|
|
13327
|
+
* TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
|
|
13328
|
+
*
|
|
13329
|
+
* @default true
|
|
13330
|
+
*/
|
|
13331
|
+
this.autoCorrectParts = true;
|
|
13332
|
+
/**
|
|
13333
|
+
* Determines whether to automatically move to the next segment after the user completes the current one.
|
|
13334
|
+
*
|
|
13335
|
+
* @default true
|
|
13336
|
+
*/
|
|
13337
|
+
this.autoSwitchParts = true;
|
|
13338
|
+
/**
|
|
13339
|
+
* A string array representing custom keys, which will move the focus to the next date format segment.
|
|
13340
|
+
*/
|
|
13341
|
+
this.autoSwitchKeys = [];
|
|
13342
|
+
/**
|
|
13343
|
+
* Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
|
|
13344
|
+
*
|
|
13345
|
+
* @default true
|
|
13346
|
+
*/
|
|
13347
|
+
this.enableMouseWheel = true;
|
|
13348
|
+
/**
|
|
13349
|
+
* Determines if the users should see a blinking caret inside the Date Input when possible.
|
|
13350
|
+
*
|
|
13351
|
+
* @default false
|
|
13352
|
+
*/
|
|
13353
|
+
this.allowCaretMode = false;
|
|
13354
|
+
/**
|
|
13355
|
+
* When enabled, the DateTimePicker will autofill the rest of the date to the current date when the component loses focus.
|
|
13356
|
+
*
|
|
13357
|
+
* @default false
|
|
13358
|
+
*/
|
|
13359
|
+
this.autoFill = false;
|
|
13786
13360
|
/**
|
|
13787
13361
|
* Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
|
|
13788
13362
|
*/
|
|
@@ -14845,7 +14419,7 @@ class DateTimePickerComponent {
|
|
|
14845
14419
|
}
|
|
14846
14420
|
}
|
|
14847
14421
|
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i1$2.PopupService }, { token: i1.IntlService }, { token: i0.ChangeDetectorRef }, { token: PickerService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: TOUCH_ENABLED }, { token: i1$1.LocalizationService }, { token: DisabledDatesService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
14848
|
-
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: { focusableId: "focusableId", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", tabindex: "tabindex", disabledDates: "disabledDates", popupSettings: "popupSettings", title: "title", subtitle: "subtitle", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", cancelButton: "cancelButton", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", focusedDate: "focusedDate", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", weekNumber: "weekNumber", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", incompleteDateValidation: "incompleteDateValidation", adaptiveMode: "adaptiveMode", defaultTab: "defaultTab", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-datetimepicker": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
14422
|
+
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: { focusableId: "focusableId", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", tabindex: "tabindex", disabledDates: "disabledDates", popupSettings: "popupSettings", title: "title", subtitle: "subtitle", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", cancelButton: "cancelButton", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", focusedDate: "focusedDate", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", weekNumber: "weekNumber", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", incompleteDateValidation: "incompleteDateValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", enableMouseWheel: "enableMouseWheel", allowCaretMode: "allowCaretMode", autoFill: "autoFill", adaptiveMode: "adaptiveMode", defaultTab: "defaultTab", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-datetimepicker": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
14849
14423
|
PickerService,
|
|
14850
14424
|
LocalizationService,
|
|
14851
14425
|
DisabledDatesService,
|
|
@@ -14926,6 +14500,12 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
14926
14500
|
[min]="min"
|
|
14927
14501
|
[max]="max"
|
|
14928
14502
|
[incompleteDateValidation]="incompleteDateValidation"
|
|
14503
|
+
[autoCorrectParts]="autoCorrectParts"
|
|
14504
|
+
[autoSwitchParts]="autoSwitchParts"
|
|
14505
|
+
[autoSwitchKeys]="autoSwitchKeys"
|
|
14506
|
+
[enableMouseWheel]="enableMouseWheel"
|
|
14507
|
+
[allowCaretMode]="allowCaretMode"
|
|
14508
|
+
[autoFill]="autoFill"
|
|
14929
14509
|
[formatPlaceholder]="formatPlaceholder"
|
|
14930
14510
|
[placeholder]="placeholder"
|
|
14931
14511
|
[disabled]="disabled"
|
|
@@ -15205,7 +14785,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
15205
14785
|
</div>
|
|
15206
14786
|
</div>
|
|
15207
14787
|
</ng-template>
|
|
15208
|
-
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "
|
|
14788
|
+
`, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "size"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15209
14789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
15210
14790
|
type: Component,
|
|
15211
14791
|
args: [{
|
|
@@ -15294,6 +14874,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
15294
14874
|
[min]="min"
|
|
15295
14875
|
[max]="max"
|
|
15296
14876
|
[incompleteDateValidation]="incompleteDateValidation"
|
|
14877
|
+
[autoCorrectParts]="autoCorrectParts"
|
|
14878
|
+
[autoSwitchParts]="autoSwitchParts"
|
|
14879
|
+
[autoSwitchKeys]="autoSwitchKeys"
|
|
14880
|
+
[enableMouseWheel]="enableMouseWheel"
|
|
14881
|
+
[allowCaretMode]="allowCaretMode"
|
|
14882
|
+
[autoFill]="autoFill"
|
|
15297
14883
|
[formatPlaceholder]="formatPlaceholder"
|
|
15298
14884
|
[placeholder]="placeholder"
|
|
15299
14885
|
[disabled]="disabled"
|
|
@@ -15642,6 +15228,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
15642
15228
|
type: Input
|
|
15643
15229
|
}], incompleteDateValidation: [{
|
|
15644
15230
|
type: Input
|
|
15231
|
+
}], autoCorrectParts: [{
|
|
15232
|
+
type: Input
|
|
15233
|
+
}], autoSwitchParts: [{
|
|
15234
|
+
type: Input
|
|
15235
|
+
}], autoSwitchKeys: [{
|
|
15236
|
+
type: Input
|
|
15237
|
+
}], enableMouseWheel: [{
|
|
15238
|
+
type: Input
|
|
15239
|
+
}], allowCaretMode: [{
|
|
15240
|
+
type: Input
|
|
15241
|
+
}], autoFill: [{
|
|
15242
|
+
type: Input
|
|
15645
15243
|
}], adaptiveMode: [{
|
|
15646
15244
|
type: Input
|
|
15647
15245
|
}], valueChange: [{
|