@progress/kendo-angular-dateinputs 14.0.0-develop.1 → 14.0.0-develop.11

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.
@@ -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: 1695995056,
40
- version: '14.0.0-develop.1',
40
+ publishDate: 1696927432,
41
+ version: '14.0.0-develop.11',
41
42
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
42
43
  };
43
44
 
@@ -7033,424 +7034,37 @@ let nextId = 0;
7033
7034
  const MIN_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DateInputComponent/#toc-min';
7034
7035
  const MAX_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DateInputComponent/#toc-max';
7035
7036
  const VALUE_DOC_LINK$3 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/dateinput/#toc-using-with-json';
7036
- const DATE_PART_REGEXP = /year|month|<day>/;
7037
- const TIME_PART_REGEXP = /hour|minute|second|millisecond/;
7038
- const SHORT_PATTERN_LENGTH_REGEXP = /d|M|H|h|m|s/;
7039
7037
  const TWO_DIGIT_YEAR_MAX$2 = 68;
7040
- const PREVIOUS_CENTURY_BASE = 1900;
7041
- const CURRENT_CENTURY_BASE = 2000;
7042
7038
  const DEFAULT_FORMAT$1 = 'd';
7043
- const padZero = (length) => new Array(Math.max(length, 0)).fill('0').join('');
7044
- const unpadZero = (value) => value.replace(/^0*/, '');
7045
- class Mask {
7046
- constructor() {
7047
- this.symbols = "";
7048
- }
7049
- }
7050
- class KendoDate {
7051
- constructor(intl, formatPlaceholder, format, value, twoDigitYearMax = TWO_DIGIT_YEAR_MAX$2) {
7052
- this.intl = intl;
7053
- this.formatPlaceholder = formatPlaceholder;
7054
- this.format = format;
7055
- this.twoDigitYearMax = twoDigitYearMax;
7056
- this.year = true;
7057
- this.month = true;
7058
- this.date = true;
7059
- this.hours = true;
7060
- this.minutes = true;
7061
- this.seconds = true;
7062
- this.milliseconds = true;
7063
- this.leadingZero = null;
7064
- this.monthNames = null;
7065
- this.typedMonthPart = "";
7066
- this.value = getDate(new Date());
7067
- this.knownParts = "adHhmMsSEy";
7068
- this.symbols = {
7069
- "E": "E",
7070
- "H": "H",
7071
- "M": "M",
7072
- "a": "a",
7073
- "d": "d",
7074
- "h": "h",
7075
- "m": "m",
7076
- "s": "s",
7077
- "S": "S",
7078
- "y": "y"
7079
- };
7080
- validatePackage(packageMetadata);
7081
- this.monthNames = this.allFormatedMonths();
7082
- this.dayPeriods = this.allDayPeriods();
7083
- if (!value) {
7084
- this.value = getDate(new Date());
7085
- const sampleFormat = this.dateFormatString(this.value, this.format).symbols;
7086
- for (let i = 0; i < sampleFormat.length; i++) {
7087
- this.setExisting(sampleFormat[i], false);
7088
- }
7089
- }
7090
- else {
7091
- this.value = cloneDate(value);
7092
- }
7093
- }
7094
- hasValue() {
7095
- const pred = (a, p) => a || p.type !== 'literal' && p.type !== 'dayperiod' && this.getExisting(p.pattern[0]);
7096
- return this.intl.splitDateFormat(this.format).reduce(pred, false);
7097
- }
7098
- shouldNormalizeCentury() {
7099
- return this.intl.splitDateFormat(this.format).some(part => part.pattern === 'yy');
7100
- }
7101
- getDateObject() {
7102
- for (let i = 0; i < this.knownParts.length; i++) {
7103
- if (!this.getExisting(this.knownParts[i])) {
7104
- return null;
7105
- }
7106
- }
7107
- return cloneDate(this.value);
7108
- }
7109
- getTextAndFormat(format) {
7110
- return this.merge(this.intl.formatDate(this.value, format), this.dateFormatString(this.value, format));
7111
- }
7112
- getExisting(symbol) {
7113
- switch (symbol) {
7114
- case "y": return this.year;
7115
- case "M":
7116
- case "L": return this.month;
7117
- case "d": return this.date;
7118
- case "E": return this.date && this.month && this.year;
7119
- case "h":
7120
- case "H": return this.hours;
7121
- case "m": return this.minutes;
7122
- case "s": return this.seconds;
7123
- case "S": return this.milliseconds;
7124
- default: return true;
7125
- }
7126
- }
7127
- setExisting(symbol, value) {
7128
- switch (symbol) {
7129
- case "y":
7130
- this.year = value;
7131
- if (value === false) {
7132
- this.value.setFullYear(2000);
7133
- }
7134
- break; //allow 2/29 dates
7135
- case "M":
7136
- this.month = value;
7137
- if (value === false) {
7138
- this.value.setMonth(0);
7139
- }
7140
- break; //make sure you can type 31 at day part
7141
- case "d":
7142
- this.date = value;
7143
- break;
7144
- case "h":
7145
- case "H":
7146
- this.hours = value;
7147
- break;
7148
- case "m":
7149
- this.minutes = value;
7150
- break;
7151
- case "s":
7152
- this.seconds = value;
7153
- break;
7154
- case "S":
7155
- this.milliseconds = value;
7156
- break;
7157
- default: return;
7158
- }
7159
- }
7160
- modifyPart(symbol, offset) {
7161
- let newValue = cloneDate(this.value);
7162
- switch (symbol) {
7163
- case "y":
7164
- newValue.setFullYear(newValue.getFullYear() + offset);
7165
- break;
7166
- case "M":
7167
- newValue = addMonths(this.value, offset);
7168
- break;
7169
- case "d":
7170
- case "E":
7171
- newValue.setDate(newValue.getDate() + offset);
7172
- break;
7173
- case "h":
7174
- case "H":
7175
- newValue.setHours(newValue.getHours() + offset);
7176
- break;
7177
- case "m":
7178
- newValue.setMinutes(newValue.getMinutes() + offset);
7179
- break;
7180
- case "s":
7181
- newValue.setSeconds(newValue.getSeconds() + offset);
7182
- break;
7183
- case "S":
7184
- newValue.setMilliseconds(newValue.getMilliseconds() + offset);
7185
- break;
7186
- case "a":
7187
- newValue.setHours(newValue.getHours() + (12 * offset));
7188
- break;
7189
- default: break;
7190
- }
7191
- if (this.shouldNormalizeCentury()) {
7192
- newValue = this.normalizeCentury(newValue);
7193
- }
7194
- if (newValue.getFullYear() > 0) {
7195
- this.setExisting(symbol, true);
7196
- this.value = newValue;
7197
- }
7198
- }
7199
- parsePart(symbol, currentChar, resetSegmentValue) {
7200
- if (!currentChar) {
7201
- this.resetLeadingZero();
7202
- this.setExisting(symbol, false);
7203
- return { value: null, switchToNext: false };
7204
- }
7205
- const baseDate = this.intl.formatDate(this.value, this.format);
7206
- const dateParts = this.dateFormatString(this.value, this.format);
7207
- const baseFormat = dateParts.symbols;
7208
- let replaced = false;
7209
- let prefix = "";
7210
- let current = "";
7211
- let suffix = "";
7212
- for (let i = 0; i < baseDate.length; i++) {
7213
- if (baseFormat[i] === symbol) {
7214
- current += this.getExisting(symbol) ? baseDate[i] : "0";
7215
- replaced = true;
7216
- }
7217
- else if (!replaced) {
7218
- prefix += baseDate[i];
7219
- }
7220
- else {
7221
- suffix += baseDate[i];
7222
- }
7223
- }
7224
- const currentMaxLength = current.length - 3;
7225
- let parsedDate = null;
7226
- const month = this.matchMonth(currentChar);
7227
- const dayPeriod = this.matchDayPeriod(currentChar, symbol);
7228
- const isZeroCurrentChar = currentChar === '0';
7229
- const leadingZero = (this.leadingZero || {})[symbol] || 0;
7230
- if (isZeroCurrentChar) {
7231
- const valueNumber = parseInt(resetSegmentValue ? currentChar : current + currentChar, 10);
7232
- if (valueNumber === 0 && !this.isAbbrMonth(dateParts.partMap, symbol)) {
7233
- this.incrementLeadingZero(symbol);
7234
- }
7235
- }
7236
- else {
7237
- this.resetLeadingZero();
7238
- }
7239
- for (let i = Math.max(0, currentMaxLength); i <= current.length; i++) {
7240
- let middle = resetSegmentValue ? currentChar : (current.substring(i) + currentChar);
7241
- if (symbol === "S" && resetSegmentValue) {
7242
- // 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"
7243
- const padding = msPaddingFromFormat(baseFormat);
7244
- middle = padding + middle;
7245
- }
7246
- const middleNumber = parseInt(middle, 10);
7247
- parsedDate = this.intl.parseDate(prefix + middle + suffix, this.format);
7248
- if (!parsedDate && !isNaN(middleNumber) && !isNaN(parseInt(currentChar, 10))) {
7249
- if (symbol === 'M' && !month) {
7250
- const monthNumber = middleNumber - 1;
7251
- if (monthNumber > -1 && monthNumber < 12) {
7252
- parsedDate = cloneDate(this.value);
7253
- parsedDate.setMonth(monthNumber);
7254
- if (parsedDate.getMonth() !== monthNumber) {
7255
- parsedDate = lastDayOfMonth(addMonths(parsedDate, -1));
7256
- }
7257
- }
7258
- }
7259
- if (symbol === 'y') {
7260
- 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);
7261
- if (this.date && parsedDate.getDate() !== this.value.getDate()) {
7262
- parsedDate = lastDayOfMonth(addMonths(parsedDate, -1));
7263
- }
7264
- }
7265
- }
7266
- if (parsedDate) {
7267
- //move to next segment if the part will overflow with next char
7268
- //when start from empty date (01, then 010), padded zeros should be trimmed
7269
- const patternValue = this.partPattern(dateParts.partMap, symbol).pattern;
7270
- const peekDate = this.intl.parseDate(`${prefix}${this.peek(middle, patternValue)}${suffix}`, this.format);
7271
- const patternLength = this.patternLength(patternValue) || patternValue.length;
7272
- const patternSatisfied = (leadingZero + (unpadZero(middle) || currentChar).length) >= patternLength;
7273
- const switchToNext = peekDate === null || patternSatisfied;
7274
- if (this.shouldNormalizeCentury()) {
7275
- parsedDate = this.normalizeCentury(parsedDate);
7276
- }
7277
- this.value = parsedDate;
7278
- this.setExisting(symbol, true);
7279
- return { value: this.value, switchToNext: switchToNext };
7280
- }
7281
- }
7282
- if (month) {
7283
- parsedDate = this.intl.parseDate(prefix + month + suffix, this.format);
7284
- if (parsedDate) {
7285
- this.value = parsedDate;
7286
- this.setExisting(symbol, true);
7287
- return { value: this.value, switchToNext: false };
7288
- }
7289
- }
7290
- if (dayPeriod) {
7291
- parsedDate = this.intl.parseDate(prefix + dayPeriod + suffix, this.format);
7292
- if (parsedDate) {
7293
- this.value = parsedDate;
7294
- return { value: this.value, switchToNext: true };
7295
- }
7296
- }
7297
- if (isZeroCurrentChar) {
7298
- this.setExisting(symbol, false);
7299
- }
7300
- return { value: null, switchToNext: false };
7301
- }
7302
- resetLeadingZero() {
7303
- const hasLeadingZero = this.leadingZero !== null;
7304
- this.setLeadingZero(null);
7305
- return hasLeadingZero;
7306
- }
7307
- setLeadingZero(leadingZero) {
7308
- this.leadingZero = leadingZero;
7309
- }
7310
- normalizeCentury(date) {
7311
- if (!isPresent(date)) {
7312
- return date;
7313
- }
7314
- const twoDigitYear = cropTwoDigitYear(date);
7315
- const centuryBase = this.getNormalizedCenturyBase(twoDigitYear);
7316
- const normalizedDate = setYears(date, centuryBase + twoDigitYear);
7317
- return normalizedDate;
7318
- }
7319
- incrementLeadingZero(symbol) {
7320
- const leadingZero = this.leadingZero || {};
7321
- leadingZero[symbol] = (leadingZero[symbol] || 0) + 1;
7322
- this.leadingZero = leadingZero;
7323
- }
7324
- isAbbrMonth(parts, symbol) {
7325
- const pattern = this.partPattern(parts, symbol);
7326
- return pattern.type === 'month' && pattern.names;
7327
- }
7328
- partPattern(parts, symbol) {
7329
- return parts.filter((part) => part.pattern.indexOf(symbol) !== -1)[0];
7330
- }
7331
- peek(value, pattern) {
7332
- const peekValue = unpadZero(value) + '0';
7333
- return padZero(pattern.length - peekValue.length) + peekValue;
7334
- }
7335
- matchMonth(typedChar) {
7336
- this.typedMonthPart += typedChar.toLowerCase();
7337
- if (!this.monthNames) {
7338
- return "";
7339
- }
7340
- while (this.typedMonthPart.length > 0) {
7341
- for (let i = 0; i < this.monthNames.length; i++) {
7342
- if (this.monthNames[i].toLowerCase().indexOf(this.typedMonthPart) === 0) {
7343
- return this.monthNames[i];
7344
- }
7345
- }
7346
- const monthAsNum = parseInt(this.typedMonthPart, 10);
7347
- if (monthAsNum >= 1 && monthAsNum <= 12 && monthAsNum.toString() === this.typedMonthPart /*ensure they exact match*/) {
7348
- return this.monthNames[monthAsNum - 1];
7349
- }
7350
- this.typedMonthPart = this.typedMonthPart.substring(1, this.typedMonthPart.length);
7351
- }
7352
- return "";
7353
- }
7354
- matchDayPeriod(typedChar, symbol) {
7355
- const lowerChart = String(typedChar).toLowerCase();
7356
- if (symbol === 'a' && this.dayPeriods) {
7357
- if (this.dayPeriods.am.toLowerCase().startsWith(lowerChart)) {
7358
- return this.dayPeriods.am;
7359
- }
7360
- else if (this.dayPeriods.pm.toLowerCase().startsWith(lowerChart)) {
7361
- return this.dayPeriods.pm;
7362
- }
7363
- }
7364
- return '';
7365
- }
7366
- allFormatedMonths() {
7367
- const dateFormatParts = this.intl.splitDateFormat(this.format);
7368
- for (let i = 0; i < dateFormatParts.length; i++) {
7369
- if (dateFormatParts[i].type === "month" && dateFormatParts[i].names) {
7370
- return this.intl.dateFormatNames(dateFormatParts[i].names);
7371
- }
7372
- }
7373
- return null;
7374
- }
7375
- allDayPeriods() {
7376
- const dateFormatParts = this.intl.splitDateFormat(this.format);
7377
- for (let i = 0; i < dateFormatParts.length; i++) {
7378
- if (dateFormatParts[i].type === "dayperiod" && dateFormatParts[i].names) {
7379
- return this.intl.dateFormatNames(dateFormatParts[i].names);
7380
- }
7381
- }
7382
- return null;
7383
- }
7384
- patternLength(pattern) {
7385
- if (pattern[0] === 'y') {
7386
- return 4;
7387
- }
7388
- if (SHORT_PATTERN_LENGTH_REGEXP.test(pattern)) {
7389
- return 2;
7390
- }
7391
- return 0;
7392
- }
7393
- //TODO: REMOVE!
7394
- dateFormatString(date, format) {
7395
- const dateFormatParts = this.intl.splitDateFormat(format);
7396
- const parts = [];
7397
- const partMap = [];
7398
- for (let i = 0; i < dateFormatParts.length; i++) {
7399
- let partLength = this.intl.formatDate(date, { pattern: dateFormatParts[i].pattern }).length;
7400
- while (partLength > 0) {
7401
- parts.push(this.symbols[dateFormatParts[i].pattern[0]] || "_");
7402
- partMap.push(dateFormatParts[i]);
7403
- partLength--;
7404
- }
7405
- }
7406
- const returnValue = new Mask();
7407
- returnValue.symbols = parts.join("");
7408
- returnValue.partMap = partMap;
7409
- return returnValue;
7410
- }
7411
- merge(text, mask) {
7412
- // Important: right to left.
7413
- let resultText = "";
7414
- let resultFormat = "";
7415
- const format = mask.symbols;
7416
- for (let r = format.length - 1; r >= 0; r--) {
7417
- if (this.knownParts.indexOf(format[r]) === -1 || this.getExisting(format[r])) {
7418
- resultText = text[r] + resultText;
7419
- resultFormat = format[r] + resultFormat;
7420
- }
7421
- else {
7422
- const currentSymbol = format[r];
7423
- while (r >= 0 && currentSymbol === format[r]) {
7424
- r--;
7425
- }
7426
- r++;
7427
- if (this.leadingZero && this.leadingZero[currentSymbol]) {
7428
- resultText = '0' + resultText;
7429
- }
7430
- else {
7431
- resultText = this.dateFieldName(mask.partMap[r]) + resultText;
7432
- }
7433
- while (resultFormat.length < resultText.length) {
7434
- resultFormat = format[r] + resultFormat;
7435
- }
7436
- }
7437
- }
7438
- return [resultText, resultFormat];
7439
- }
7440
- dateFieldName(part) {
7441
- const formatPlaceholder = this.formatPlaceholder || 'wide';
7442
- if (formatPlaceholder[part.type]) {
7443
- return formatPlaceholder[part.type];
7444
- }
7445
- if (formatPlaceholder === 'formatPattern') {
7446
- return part.pattern;
7447
- }
7448
- return this.intl.dateFieldName(Object.assign(part, { nameType: formatPlaceholder }));
7449
- }
7450
- getNormalizedCenturyBase(twoDigitYear) {
7451
- return twoDigitYear > this.twoDigitYearMax ?
7452
- PREVIOUS_CENTURY_BASE :
7453
- CURRENT_CENTURY_BASE;
7039
+ const DEFAULT_FORMAT_PLACEHOLDER = 'wide';
7040
+ const DATE_PART_REGEXP = /year|month|<day>/;
7041
+ const TIME_PART_REGEXP = /hour|minute|second|millisecond/;
7042
+ /**
7043
+ * @hidden
7044
+ * Need to overrite `dateFormatNames` parameters order and provide `cldr` object
7045
+ * required by the kendo-dateinputs-common package
7046
+ */
7047
+ class DateInputIntl {
7048
+ constructor(service) {
7049
+ this.service = service;
7050
+ this.cldr = {};
7051
+ this.localeId = service['localeId'];
7052
+ this.format = service.format;
7053
+ this.toString = service.toString;
7054
+ this.formatDate = service.formatDate;
7055
+ this.parseDate = service.parseDate;
7056
+ this.parseNumber = service.parseNumber;
7057
+ this.formatNumber = service.formatNumber;
7058
+ this.splitDateFormat = service.splitDateFormat;
7059
+ this.numberSymbols = service.numberSymbols;
7060
+ this.firstDay = service.firstDay;
7061
+ this.weekendRange = service.weekendRange;
7062
+ this.dateFieldName = service.dateFieldName;
7063
+ this.dateFormatNames = (localeId, options) => this.service.dateFormatNames(options, localeId || this.localeId);
7064
+ const _localeData = localeData(this.localeId);
7065
+ // Setting the `cldr` object from here could be avoided if the logic in the common package is revisited to
7066
+ // directly relies on the `localeId` being set as part of the options => TBD and validated for all suites
7067
+ this.cldr[_localeData.name] = _localeData;
7454
7068
  }
7455
7069
  }
7456
7070
  /**
@@ -7546,16 +7160,50 @@ class DateInputComponent {
7546
7160
  * }
7547
7161
  * ```
7548
7162
  */
7549
- this.steps = {};
7163
+ this.steps = {
7164
+ // Default values are needed until fix in common package: https://github.com/telerik/kendo-dateinputs-common/issues/26
7165
+ second: 1,
7166
+ minute: 1,
7167
+ hour: 1,
7168
+ day: 1,
7169
+ month: 1,
7170
+ year: 1
7171
+ };
7550
7172
  /**
7551
7173
  * Determines whether the built-in min or max validators are to be enforced when a form is being validated.
7552
7174
  */
7553
7175
  this.rangeValidation = true;
7554
7176
  /**
7555
7177
  * @hidden
7556
- * Based on the min and max values, specifies whether the value will be auto-corrected while typing.
7178
+ *
7179
+ * Determines whether to auto correct invalid segments automatically.
7180
+ * TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
7181
+ *
7182
+ * @default true
7557
7183
  */
7558
- this.autoCorrect = false;
7184
+ this.autoCorrectParts = true;
7185
+ /**
7186
+ * Determines whether to automatically move to the next segment after the user completes the current one.
7187
+ *
7188
+ * @default true
7189
+ */
7190
+ this.autoSwitchParts = true;
7191
+ /**
7192
+ * A string array representing custom keys, which will move the focus to the next date format segment.
7193
+ */
7194
+ this.autoSwitchKeys = [];
7195
+ /**
7196
+ * Determines if the users should see a blinking caret inside the Date Input when possible.
7197
+ *
7198
+ * @default false
7199
+ */
7200
+ this.allowCaretMode = false;
7201
+ /**
7202
+ * When enabled, the DateInput will autofill the rest of the date to the current date when the component loses focus.
7203
+ *
7204
+ * @default false
7205
+ */
7206
+ this.autoFill = false;
7559
7207
  /**
7560
7208
  * Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
7561
7209
  */
@@ -7568,6 +7216,12 @@ class DateInputComponent {
7568
7216
  * will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
7569
7217
  */
7570
7218
  this.twoDigitYearMax = TWO_DIGIT_YEAR_MAX$2;
7219
+ /**
7220
+ * Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
7221
+ *
7222
+ * @default true
7223
+ */
7224
+ this.enableMouseWheel = true;
7571
7225
  /**
7572
7226
  * Specifies whether the **Up** and **Down** spin buttons will be rendered.
7573
7227
  * For more information, refer to the article on
@@ -7644,18 +7298,16 @@ class DateInputComponent {
7644
7298
  * @hidden
7645
7299
  */
7646
7300
  this.isDateIncomplete = false;
7647
- this.currentValue = "";
7648
7301
  this.currentFormat = "";
7649
- this.backspace = false;
7650
- this.resetSegmentValue = true;
7651
7302
  this.minValidator = noop$2;
7652
7303
  this.maxValidator = noop$2;
7653
7304
  this.incompleteValidator = noop$2;
7654
7305
  this._value = null;
7655
7306
  this._active = false;
7656
7307
  this._focusableId = `dateinput-${nextId++}`;
7308
+ this._formatPlaceholder = DEFAULT_FORMAT_PLACEHOLDER;
7657
7309
  this.kendoDate = null;
7658
- this.paste = false;
7310
+ this.kendoDateObject = null;
7659
7311
  this.domEvents = [];
7660
7312
  this.onControlChange = noop$2;
7661
7313
  this.onControlTouched = noop$2;
@@ -7664,8 +7316,7 @@ class DateInputComponent {
7664
7316
  this._rounded = DEFAULT_ROUNDED;
7665
7317
  this._fillMode = DEFAULT_FILL_MODE;
7666
7318
  this.subs = new Subscription();
7667
- this.symbolsMap = this.dateSymbolMap();
7668
- this.updateFormatSections();
7319
+ validatePackage(packageMetadata);
7669
7320
  if (this.pickerService) {
7670
7321
  this.pickerService.input = this;
7671
7322
  }
@@ -7702,6 +7353,58 @@ class DateInputComponent {
7702
7353
  get tabIndex() {
7703
7354
  return this.tabindex;
7704
7355
  }
7356
+ /**
7357
+ * Defines the descriptions of the format sections in the input field.
7358
+ * For more information, refer to the article on
7359
+ * [placeholders]({% slug placeholders_dateinput %}).
7360
+ *
7361
+ * @example
7362
+ * ```ts
7363
+ * _@Component({
7364
+ * selector: 'my-app',
7365
+ * template: `
7366
+ * <div class="row example-wrapper" [style.min-height.px]="450">
7367
+ * <div class="col-xs-12 col-md-6 example-col">
7368
+ * <p>Full-length format description:</p>
7369
+ * <kendo-dateinput formatPlaceholder="wide"></kendo-dateinput>
7370
+ * </div>
7371
+ *
7372
+ * <div class="col-xs-12 col-md-6 example-col">
7373
+ * <p>Narrow-length format description:</p>
7374
+ * <kendo-dateinput formatPlaceholder="narrow"></kendo-dateinput>
7375
+ * </div>
7376
+ *
7377
+ * <div class="col-xs-12 col-md-6 example-col">
7378
+ * <p>Short-length format description:</p>
7379
+ * <kendo-dateinput formatPlaceholder="short"></kendo-dateinput>
7380
+ * </div>
7381
+ *
7382
+ * <div class="col-xs-12 col-md-6 example-col">
7383
+ * <p>Display defined format:</p>
7384
+ * <kendo-dateinput format="MM/dd/yyyy" formatPlaceholder="formatPattern"></kendo-dateinput>
7385
+ * </div>
7386
+ *
7387
+ * <div class="col-xs-12 col-md-6 example-col">
7388
+ * <p>Custom defined format descriptions</p>
7389
+ * <kendo-dateinput format="G"
7390
+ * [formatPlaceholder]="{
7391
+ * year: 'y', month: 'M', day: 'd',
7392
+ * hour: 'h', minute: 'm', second: 's'
7393
+ * }"
7394
+ * ></kendo-dateinput>
7395
+ * </div>
7396
+ * </div>
7397
+ * `
7398
+ * })
7399
+ * export class AppComponent { }
7400
+ * ```
7401
+ */
7402
+ set formatPlaceholder(format) {
7403
+ this._formatPlaceholder = format ? format : DEFAULT_FORMAT_PLACEHOLDER;
7404
+ }
7405
+ get formatPlaceholder() {
7406
+ return this._formatPlaceholder;
7407
+ }
7705
7408
  /**
7706
7409
  * Specifies the value of the DateInput component.
7707
7410
  *
@@ -7709,9 +7412,6 @@ class DateInputComponent {
7709
7412
  */
7710
7413
  set value(value) {
7711
7414
  this.verifyValue(value);
7712
- if (this.autoCorrect && !isInRange(value, this.min, this.max)) {
7713
- return;
7714
- }
7715
7415
  this._value = cloneDate(value);
7716
7416
  this.valueUpdate.emit(cloneDate(value));
7717
7417
  }
@@ -7823,34 +7523,39 @@ class DateInputComponent {
7823
7523
  const ngControl = this.injector.get(NgControl, null);
7824
7524
  return ngControl?.control || null;
7825
7525
  }
7826
- get inputFormat() {
7827
- if (!this.format) {
7828
- return DEFAULT_FORMAT$1;
7829
- }
7830
- if (typeof this.format === 'string') {
7831
- return this.format;
7832
- }
7833
- else {
7834
- return this.format.inputFormat;
7835
- }
7836
- }
7837
- get displayFormat() {
7838
- if (!this.format) {
7839
- return DEFAULT_FORMAT$1;
7840
- }
7841
- if (typeof this.format === 'string') {
7842
- return this.format;
7843
- }
7844
- else {
7845
- return this.format.displayFormat;
7846
- }
7526
+ get options() {
7527
+ return {
7528
+ format: this.format,
7529
+ steps: this.steps,
7530
+ readonly: this.readonly,
7531
+ formatPlaceholder: this.formatPlaceholder,
7532
+ placeholder: this.placeholder,
7533
+ autoCorrectParts: this.autoCorrectParts,
7534
+ autoSwitchParts: this.autoSwitchParts,
7535
+ selectPreviousSegmentOnBackspace: true,
7536
+ autoSwitchKeys: this.autoSwitchKeys,
7537
+ twoDigitYearMax: this.twoDigitYearMax,
7538
+ enableMouseWheel: this.enableMouseWheel,
7539
+ selectNearestSegmentOnFocus: false,
7540
+ allowCaretMode: this.allowCaretMode,
7541
+ autoFill: this.autoFill,
7542
+ value: this.value,
7543
+ intlService: new DateInputIntl(this.intl)
7544
+ };
7847
7545
  }
7848
7546
  /**
7849
7547
  * @hidden
7850
7548
  * Used by the TextBoxContainer to determine if the component is empty
7851
7549
  */
7852
7550
  isEmpty() {
7853
- return !this.currentValue || !String(this.currentValue).trim();
7551
+ const currentValue = this.dateInput.nativeElement.value;
7552
+ return !currentValue || !String(currentValue).trim();
7553
+ }
7554
+ /**
7555
+ * @hidden
7556
+ */
7557
+ handleDragAndDrop(args) {
7558
+ args.preventDefault();
7854
7559
  }
7855
7560
  /**
7856
7561
  * @hidden
@@ -7862,15 +7567,16 @@ class DateInputComponent {
7862
7567
  * @hidden
7863
7568
  */
7864
7569
  ngOnInit() {
7865
- this.kendoDate = this.getKendoDate(this.value);
7866
- this.updateElementValue();
7570
+ if (this.kendoDate) {
7571
+ this.kendoDate.destroy();
7572
+ }
7573
+ this.kendoDate = this.initKendoDate();
7574
+ this.kendoDateObject = this.kendoDate.dateObject;
7575
+ this.updateFormatSections();
7867
7576
  this.subs.add(this.intl.changes.subscribe(this.intlChange.bind(this)));
7868
7577
  this.ngControl = this.injector.get(NgControl, null);
7869
7578
  if (this.wrapper) {
7870
7579
  this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
7871
- this.ngZone.runOutsideAngular(() => {
7872
- this.bindEvents();
7873
- });
7874
7580
  }
7875
7581
  }
7876
7582
  /**
@@ -7884,14 +7590,37 @@ class DateInputComponent {
7884
7590
  this.incompleteValidator = this.incompleteDateValidation ? incompleteDateValidator() : noop$2;
7885
7591
  this.onValidatorChange();
7886
7592
  }
7887
- if (changes['format']) {
7888
- this.symbolsMap = this.dateSymbolMap();
7593
+ const isEqualToKendoDate = this.kendoDate && isEqual(this.value, this.kendoDate.value);
7594
+ if (changes['format'] || !isEqualToKendoDate || changes['placeholder']) {
7595
+ if (!this.kendoDate) {
7596
+ return;
7597
+ }
7598
+ ;
7599
+ this.kendoDate?.setOptions(this.options, true);
7889
7600
  this.updateFormatSections();
7890
7601
  }
7891
- const isEqualToKendoDate = this.kendoDate && isEqual(this.value, this.kendoDate.getDateObject());
7892
- if (changes['format'] || !isEqualToKendoDate || changes['placeholder']) {
7893
- this.kendoDate = this.getKendoDate(this.value);
7894
- this.updateElementValue(this.isActive);
7602
+ }
7603
+ updateFormatSections() {
7604
+ this.formatSections = this.intl.splitDateFormat(this.kendoDate.inputFormat)
7605
+ .reduce(({ date, time }, p) => {
7606
+ return {
7607
+ date: date || DATE_PART_REGEXP.test(p.type),
7608
+ time: time || TIME_PART_REGEXP.test(p.type)
7609
+ };
7610
+ }, { date: false, time: false });
7611
+ }
7612
+ updateIncompleteValidationStatus() {
7613
+ const previousValue = this.isDateIncomplete;
7614
+ this.isDateIncomplete = this.kendoDateObject.hasValue() && this.value === null;
7615
+ if (previousValue === this.isDateIncomplete || !this.incompleteDateValidation) {
7616
+ return;
7617
+ }
7618
+ if (isPresent(this.ngControl) && !isPresent(this.pickerService)) {
7619
+ this.cdr.markForCheck();
7620
+ this.ngZone.run(() => this.onValidatorChange());
7621
+ }
7622
+ else if (isPresent(this.pickerService)) {
7623
+ this.pickerService.dateCompletenessChange.emit();
7895
7624
  }
7896
7625
  }
7897
7626
  ngAfterViewInit() {
@@ -7947,15 +7676,16 @@ class DateInputComponent {
7947
7676
  */
7948
7677
  writeValue(value) {
7949
7678
  this.verifyValue(value);
7950
- this.kendoDate = this.getKendoDate(value);
7951
7679
  this.value = cloneDate(value);
7952
- this.updateElementValue(this.isActive);
7680
+ this.kendoDate?.setOptions(this.options, true);
7681
+ this.kendoDateObject?.setValue(this.value);
7682
+ this.kendoDate?.refreshElementValue();
7953
7683
  }
7954
7684
  /**
7955
7685
  * @hidden
7956
7686
  */
7957
7687
  triggerChange() {
7958
- const value = this.kendoDate.getDateObject();
7688
+ const value = this.kendoDate.value;
7959
7689
  if (+value !== +this.value) {
7960
7690
  this.value = cloneDate(value);
7961
7691
  this.notify();
@@ -7998,11 +7728,7 @@ class DateInputComponent {
7998
7728
  * ```
7999
7729
  */
8000
7730
  focus() {
8001
- const input = this.inputElement;
8002
- if (input) {
8003
- input.focus();
8004
- this.selectDateSegment(this.currentFormat[0]);
8005
- }
7731
+ this.kendoDate && this.kendoDate.focus();
8006
7732
  }
8007
7733
  /**
8008
7734
  * Blurs the DateInput component.
@@ -8018,220 +7744,53 @@ class DateInputComponent {
8018
7744
  */
8019
7745
  handleButtonClick(offset) {
8020
7746
  this.arrowDirection = Arrow.None;
8021
- this.modifyDateSegmentValue(offset);
8022
- }
8023
- /**
8024
- * @hidden
8025
- */
8026
- modifyDateSegmentValue(offset) {
8027
- const caret = this.caret();
8028
- const symbol = this.currentFormat[caret[0]];
8029
- let step = (this.steps || {})[this.symbolsMap[symbol]] || 1;
8030
- if (symbol === "S" && !this.steps.millisecond) {
8031
- const msDigits = millisecondDigitsInFormat(this.inputFormat);
8032
- step = millisecondStepFor(msDigits);
8033
- }
8034
- this.kendoDate.modifyPart(symbol, offset * step);
8035
- this.putDateInRange();
8036
- this.updateElementValue(this.isActive);
8037
- this.triggerChange();
8038
- this.selectDateSegment(symbol);
8039
- this.updateIncompleteValidationStatus();
8040
- }
8041
- /**
8042
- * @hidden
8043
- */
8044
- switchDateSegment(offset) {
8045
- const caret = this.caret();
8046
- if (this.kendoDate.resetLeadingZero()) {
8047
- this.updateElementValue(this.isActive);
8048
- }
8049
- if (caret[0] < caret[1] && this.currentFormat[caret[0]] !== this.currentFormat[caret[1] - 1]) {
8050
- this.selectNearestSegment(offset > 0 ? caret[0] : caret[1] - 1);
8051
- this.resetSegmentValue = true;
8052
- return true;
8053
- }
8054
- const previousFormatSymbol = this.currentFormat[caret[0]];
8055
- let a = caret[0] + offset;
8056
- while (a > 0 && a < this.currentFormat.length) {
8057
- if (this.currentFormat[a] !== previousFormatSymbol &&
8058
- this.currentFormat[a] !== "_") {
8059
- break;
8060
- }
8061
- a += offset;
8062
- }
8063
- if (this.currentFormat[a] === "_") {
8064
- //there is not known symbol found
8065
- return false;
8066
- }
8067
- let b = a;
8068
- while (b >= 0 && b < this.currentFormat.length) {
8069
- if (this.currentFormat[b] !== this.currentFormat[a]) {
8070
- break;
7747
+ this.kendoDate.focus();
7748
+ this.kendoDate.modifyDateSegmentValue(offset);
7749
+ }
7750
+ initKendoDate() {
7751
+ const kendoDate = new DateInput(this.dateInput.nativeElement, {
7752
+ ...this.options,
7753
+ events: {
7754
+ valueChange: this.onWidgetValueChange.bind(this),
7755
+ inputEnd: this.onWidgetInputEnd.bind(this),
7756
+ focusEnd: this.onWidgetFocus.bind(this),
7757
+ blurEnd: this.onWidgetBlur.bind(this),
7758
+ keydown: this.onWidgetKeyDown.bind(this),
8071
7759
  }
8072
- b += offset;
8073
- }
8074
- if (a > b && (b + 1 !== caret[0] || a + 1 !== caret[1])) {
8075
- this.caret(b + 1, a + 1);
8076
- this.resetSegmentValue = true;
8077
- return true;
8078
- }
8079
- else if (a < b && (a !== caret[0] || b !== caret[1])) {
8080
- this.caret(a, b);
8081
- this.resetSegmentValue = true;
8082
- return true;
8083
- }
8084
- return false;
8085
- }
8086
- /**
8087
- * @hidden
8088
- */
8089
- selectDateSegment(symbol) {
8090
- let begin = -1;
8091
- let end = 0;
8092
- for (let i = 0; i < this.currentFormat.length; i++) {
8093
- if (this.currentFormat[i] === symbol) {
8094
- end = i + 1;
8095
- if (begin === -1) {
8096
- begin = i;
8097
- }
8098
- }
8099
- }
8100
- if (begin < 0) {
8101
- begin = 0;
8102
- }
8103
- this.caret(0, 0);
8104
- this.caret(begin, end);
7760
+ });
7761
+ return kendoDate;
8105
7762
  }
8106
- /**
8107
- * @hidden
8108
- */
8109
- handleClick() {
8110
- this.hasMousedown = false;
8111
- if (this.isActive) {
8112
- const selectionPresent = this.inputElement.selectionStart !== this.inputElement.selectionEnd;
8113
- const placeholderToggled = isPresent(this.placeholder) && !this.kendoDate.hasValue() && !this.focusedPriorToMousedown;
8114
- // focus first segment if the user hasn't selected something during mousedown and if the placeholder was just toggled
8115
- const selectFirstSegment = !selectionPresent && placeholderToggled;
8116
- const index = selectFirstSegment ? 0 : this.caret()[0];
8117
- this.selectNearestSegment(index);
8118
- }
7763
+ onWidgetValueChange() {
7764
+ this.triggerChange();
8119
7765
  }
8120
- /**
8121
- * @hidden
8122
- */
8123
- handleDragAndDrop(args) {
8124
- args.preventDefault();
7766
+ onWidgetKeyDown() {
7767
+ this.kendoDateObject = this.kendoDate.dateObject;
8125
7768
  }
8126
- /**
8127
- * @hidden
8128
- */
8129
- handleMousedown() {
8130
- this.hasMousedown = true;
8131
- this.focusedPriorToMousedown = this.isActive;
7769
+ onWidgetInputEnd() {
7770
+ this.updateIncompleteValidationStatus();
8132
7771
  }
8133
- /**
8134
- * @hidden
8135
- */
8136
- handleFocus(args) {
8137
- this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
7772
+ onWidgetFocus({ event: FocuseEvent }) {
8138
7773
  this.isActive = true;
8139
- this.updateElementValue();
8140
- if (!this.hasMousedown) {
8141
- this.caret(0, this.inputValue.length);
8142
- }
8143
- this.hasMousedown = false;
8144
7774
  if (hasObservers(this.onFocus)) {
8145
7775
  this.ngZone.run(() => {
8146
- this.emitFocus(args);
7776
+ this.emitFocus(event);
8147
7777
  });
8148
7778
  }
8149
7779
  else {
8150
- this.emitFocus(args);
7780
+ this.emitFocus(event);
8151
7781
  }
8152
7782
  }
8153
- /**
8154
- * @hidden
8155
- */
8156
- handleBlur(args) {
7783
+ onWidgetBlur({ event: FocuseEvent }) {
8157
7784
  this.isActive = false;
8158
- this.resetSegmentValue = true;
8159
- this.kendoDate.resetLeadingZero();
8160
- this.updateElementValue();
8161
7785
  if (hasObservers(this.onBlur) || requiresZoneOnBlur(this.ngControl)) {
8162
7786
  this.ngZone.run(() => {
8163
7787
  this.onControlTouched();
8164
- this.emitBlur(args);
7788
+ this.emitBlur(event);
8165
7789
  this.cdr.markForCheck();
8166
7790
  });
8167
7791
  }
8168
7792
  else {
8169
- this.emitBlur(args);
8170
- }
8171
- }
8172
- getKendoDate(value) {
8173
- const { leadingZero } = (this.kendoDate || {}) || null;
8174
- const kendoDate = new KendoDate(this.intl, this.formatPlaceholder, this.inputFormat, value, this.twoDigitYearMax);
8175
- kendoDate.setLeadingZero(this.isActive ? leadingZero : null);
8176
- return kendoDate;
8177
- }
8178
- dateSymbolMap() {
8179
- const reducer = (map, part) => {
8180
- map[part.pattern[0]] = part.type;
8181
- return map;
8182
- };
8183
- return this.intl.splitDateFormat(this.inputFormat).reduce(reducer, {});
8184
- }
8185
- updateElementValue(isActive) {
8186
- const start = this.caret()[0]; //XXX: get caret position before input is updated
8187
- const format = this.isActive ? this.inputFormat : this.displayFormat;
8188
- const texts = this.kendoDate.getTextAndFormat(format);
8189
- const showPlaceholder = !this.isActive && isPresent(this.placeholder) && !this.kendoDate.hasValue();
8190
- const input = this.inputElement;
8191
- this.currentFormat = texts[1];
8192
- this.currentValue = !showPlaceholder ? texts[0] : '';
8193
- this.renderer.setProperty(input, "value", this.currentValue);
8194
- if (input.placeholder !== this.placeholder) {
8195
- this.renderer.setProperty(input, "placeholder", this.placeholder);
8196
- }
8197
- if (isActive) {
8198
- this.selectNearestSegment(start);
8199
- }
8200
- }
8201
- caret(start, end = start) {
8202
- const isPosition = start !== undefined;
8203
- let returnValue = [start, start];
8204
- const element = this.inputElement;
8205
- if (isPosition && (this.disabled || this.readonly)) {
8206
- return undefined;
8207
- }
8208
- try {
8209
- if (element.selectionStart !== undefined) {
8210
- if (isPosition) {
8211
- if (isDocumentAvailable() && document.activeElement !== element) {
8212
- element.focus();
8213
- }
8214
- element.setSelectionRange(start, end);
8215
- }
8216
- returnValue = [element.selectionStart, element.selectionEnd];
8217
- }
8218
- }
8219
- catch (e) {
8220
- returnValue = [];
8221
- }
8222
- return returnValue;
8223
- }
8224
- selectNearestSegment(index) {
8225
- // Finds the nearest (in both directions) known part.
8226
- for (let i = index, j = index - 1; i < this.currentFormat.length || j >= 0; i++, j--) {
8227
- if (i < this.currentFormat.length && this.currentFormat[i] !== "_") {
8228
- this.selectDateSegment(this.currentFormat[i]);
8229
- return;
8230
- }
8231
- if (j >= 0 && this.currentFormat[j] !== "_") {
8232
- this.selectDateSegment(this.currentFormat[j]);
8233
- return;
8234
- }
7793
+ this.emitBlur(event);
8235
7794
  }
8236
7795
  }
8237
7796
  verifyRange() {
@@ -8250,135 +7809,9 @@ class DateInputComponent {
8250
7809
  throw new Error(`The 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK$3} for possible resolution.`);
8251
7810
  }
8252
7811
  }
8253
- putDateInRange() {
8254
- const currentDate = this.kendoDate.getDateObject();
8255
- const candidate = dateInRange(currentDate, this.min, this.max);
8256
- if (this.autoCorrect && !isEqual(currentDate, candidate)) {
8257
- this.kendoDate = this.getKendoDate(candidate);
8258
- }
8259
- }
8260
- updateFormatSections() {
8261
- this.formatSections = this.intl.splitDateFormat(this.inputFormat)
8262
- .reduce(({ date, time }, p) => {
8263
- return {
8264
- date: date || DATE_PART_REGEXP.test(p.type),
8265
- time: time || TIME_PART_REGEXP.test(p.type)
8266
- };
8267
- }, { date: false, time: false });
8268
- }
8269
7812
  intlChange() {
7813
+ this.kendoDate.setOptions(this.options, true);
8270
7814
  this.updateFormatSections();
8271
- this.kendoDate = this.getKendoDate(this.value);
8272
- this.updateElementValue(this.isActive);
8273
- }
8274
- updateOnPaste() {
8275
- let value = this.intl.parseDate(this.inputValue, this.inputFormat) || this.value;
8276
- if (isPresent(value) && this.kendoDate.shouldNormalizeCentury()) {
8277
- value = this.kendoDate.normalizeCentury(value);
8278
- }
8279
- const notify = +value !== +this.value;
8280
- this.writeValue(value);
8281
- if (notify) {
8282
- this.notify();
8283
- }
8284
- }
8285
- bindEvents() {
8286
- const element = this.wrapper.nativeElement;
8287
- const mousewheelHandler = this.handleMouseWheel.bind(this);
8288
- 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)));
8289
- }
8290
- handleMouseWheel(event) {
8291
- if (this.disabled || this.readonly || !this.isActive) {
8292
- return;
8293
- }
8294
- event = window.event || event;
8295
- if (event.shiftKey) {
8296
- this.switchDateSegment((event.wheelDelta || -event.detail) > 0 ? -1 : 1);
8297
- }
8298
- else {
8299
- this.modifyDateSegmentValue((event.wheelDelta || -event.detail) > 0 ? 1 : -1);
8300
- }
8301
- event.returnValue = false;
8302
- if (event.preventDefault) {
8303
- event.preventDefault();
8304
- }
8305
- if (event.stopPropagation) {
8306
- event.stopPropagation();
8307
- }
8308
- }
8309
- handlePaste() {
8310
- this.paste = true;
8311
- }
8312
- handleKeydown(event) {
8313
- if (this.disabled || this.readonly || event.altKey || event.ctrlKey || event.metaKey) {
8314
- return;
8315
- }
8316
- if (event.keyCode === Keys$1.Backspace) {
8317
- this.backspace = true;
8318
- return;
8319
- }
8320
- switch (event.keyCode) {
8321
- case Keys$1.ArrowDown:
8322
- this.modifyDateSegmentValue(-1);
8323
- break;
8324
- case Keys$1.ArrowUp:
8325
- this.modifyDateSegmentValue(1);
8326
- break;
8327
- case Keys$1.ArrowRight:
8328
- this.switchDateSegment(1);
8329
- break;
8330
- case Keys$1.ArrowLeft:
8331
- this.switchDateSegment(-1);
8332
- break;
8333
- case Keys$1.Home:
8334
- this.selectNearestSegment(0);
8335
- break;
8336
- case Keys$1.End:
8337
- this.selectNearestSegment(this.inputValue.length);
8338
- break;
8339
- default:
8340
- return; //skip the preventDefault if we didn't handled the keyCode
8341
- }
8342
- event.preventDefault();
8343
- }
8344
- handleInput() {
8345
- if (this.disabled || this.readonly) {
8346
- return;
8347
- }
8348
- if (this.paste) {
8349
- this.updateOnPaste();
8350
- this.paste = false;
8351
- return;
8352
- }
8353
- const diff = approximateStringMatching(this.currentValue, this.currentFormat, this.inputValue, this.caret()[0]);
8354
- const navigationOnly = (diff.length === 1 && diff[0][1] === "_");
8355
- let switchPart = false;
8356
- if (!navigationOnly) {
8357
- let parsedPart;
8358
- for (let i = 0; i < diff.length; i++) {
8359
- parsedPart = this.kendoDate.parsePart(diff[i][0], diff[i][1], this.resetSegmentValue);
8360
- switchPart = parsedPart.switchToNext;
8361
- }
8362
- const candidate = this.kendoDate.getDateObject();
8363
- if (this.value && candidate && !this.formatSections['date']) {
8364
- this.kendoDate = this.getKendoDate(setTime(this.value, candidate));
8365
- }
8366
- }
8367
- this.resetSegmentValue = false;
8368
- this.putDateInRange();
8369
- this.updateElementValue(this.isActive);
8370
- this.triggerChange();
8371
- this.updateIncompleteValidationStatus();
8372
- if (diff.length && diff[0][0] !== "_") {
8373
- this.selectDateSegment(diff[0][0]);
8374
- }
8375
- if (switchPart || navigationOnly) {
8376
- this.switchDateSegment(1);
8377
- }
8378
- if (this.backspace) {
8379
- this.switchDateSegment(-1);
8380
- }
8381
- this.backspace = false;
8382
7815
  }
8383
7816
  emitFocus(args) {
8384
7817
  this.onFocus.emit();
@@ -8392,20 +7825,6 @@ class DateInputComponent {
8392
7825
  this.pickerService.onBlur.emit(args);
8393
7826
  }
8394
7827
  }
8395
- updateIncompleteValidationStatus() {
8396
- const previousValue = this.isDateIncomplete;
8397
- this.isDateIncomplete = this.kendoDate.hasValue() && this.value === null;
8398
- if (previousValue === this.isDateIncomplete || !this.incompleteDateValidation) {
8399
- return;
8400
- }
8401
- if (isPresent(this.ngControl) && !isPresent(this.pickerService)) {
8402
- this.cdr.markForCheck();
8403
- this.ngZone.run(() => this.onValidatorChange());
8404
- }
8405
- else if (isPresent(this.pickerService)) {
8406
- this.pickerService.dateCompletenessChange.emit();
8407
- }
8408
- }
8409
7828
  setSpinnerFill(spinner, fill, oldFill) {
8410
7829
  if (oldFill !== 'none') {
8411
7830
  this.renderer.removeClass(spinner, `k-button-${oldFill}`);
@@ -8431,7 +7850,7 @@ class DateInputComponent {
8431
7850
  }
8432
7851
  }
8433
7852
  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 });
8434
- 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", autoCorrect: "autoCorrect", incompleteDateValidation: "incompleteDateValidation", twoDigitYearMax: "twoDigitYearMax", 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: [
7853
+ 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: [
8435
7854
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateInputComponent), multi: true },
8436
7855
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => DateInputComponent), multi: true },
8437
7856
  { provide: L10N_PREFIX, useValue: 'kendo.dateinput' },
@@ -8464,13 +7883,8 @@ DateInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
8464
7883
  [attr.aria-expanded]="isPopupOpen"
8465
7884
  [attr.aria-haspopup]="hasPopup"
8466
7885
  [kendoEventsOutsideAngular]="{
8467
- click: handleClick,
8468
- focus: handleFocus,
8469
- mousedown: handleMousedown,
8470
- touchstart: handleMousedown,
8471
7886
  dragstart: handleDragAndDrop,
8472
- drop: handleDragAndDrop,
8473
- blur: handleBlur
7887
+ drop: handleDragAndDrop
8474
7888
  }"
8475
7889
  [scope]="this"
8476
7890
  />
@@ -8553,13 +7967,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
8553
7967
  [attr.aria-expanded]="isPopupOpen"
8554
7968
  [attr.aria-haspopup]="hasPopup"
8555
7969
  [kendoEventsOutsideAngular]="{
8556
- click: handleClick,
8557
- focus: handleFocus,
8558
- mousedown: handleMousedown,
8559
- touchstart: handleMousedown,
8560
7970
  dragstart: handleDragAndDrop,
8561
- drop: handleDragAndDrop,
8562
- blur: handleBlur
7971
+ drop: handleDragAndDrop
8563
7972
  }"
8564
7973
  [scope]="this"
8565
7974
  />
@@ -8637,12 +8046,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
8637
8046
  type: Input
8638
8047
  }], rangeValidation: [{
8639
8048
  type: Input
8640
- }], autoCorrect: [{
8049
+ }], autoCorrectParts: [{
8050
+ type: Input
8051
+ }], autoSwitchParts: [{
8052
+ type: Input
8053
+ }], autoSwitchKeys: [{
8054
+ type: Input
8055
+ }], allowCaretMode: [{
8056
+ type: Input
8057
+ }], autoFill: [{
8641
8058
  type: Input
8642
8059
  }], incompleteDateValidation: [{
8643
8060
  type: Input
8644
8061
  }], twoDigitYearMax: [{
8645
8062
  type: Input
8063
+ }], enableMouseWheel: [{
8064
+ type: Input
8646
8065
  }], value: [{
8647
8066
  type: Input
8648
8067
  }], spinners: [{
@@ -8914,6 +8333,43 @@ class DatePickerComponent {
8914
8333
  * Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
8915
8334
  */
8916
8335
  this.incompleteDateValidation = false;
8336
+ /**
8337
+ * @hidden
8338
+ *
8339
+ * Determines whether to auto correct invalid segments automatically.
8340
+ * TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
8341
+ *
8342
+ * @default true
8343
+ */
8344
+ this.autoCorrectParts = true;
8345
+ /**
8346
+ * Determines whether to automatically move to the next segment after the user completes the current one.
8347
+ *
8348
+ * @default true
8349
+ */
8350
+ this.autoSwitchParts = true;
8351
+ /**
8352
+ * A string array representing custom keys, which will move the focus to the next date format segment.
8353
+ */
8354
+ this.autoSwitchKeys = [];
8355
+ /**
8356
+ * Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
8357
+ *
8358
+ * @default true
8359
+ */
8360
+ this.enableMouseWheel = true;
8361
+ /**
8362
+ * Determines if the users should see a blinking caret inside the Date Input when possible.
8363
+ *
8364
+ * @default false
8365
+ */
8366
+ this.allowCaretMode = false;
8367
+ /**
8368
+ * When enabled, the DatePicker will autofill the rest of the date to the current date when the component loses focus.
8369
+ *
8370
+ * @default false
8371
+ */
8372
+ this.autoFill = false;
8917
8373
  /**
8918
8374
  * Specifies the focused date of the Calendar component
8919
8375
  * ([see example]({% slug calendar_type_datepicker %}#toc-focused-dates)).
@@ -9811,7 +9267,7 @@ class DatePickerComponent {
9811
9267
  }
9812
9268
  }
9813
9269
  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 });
9814
- 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: [
9270
+ 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: [
9815
9271
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true },
9816
9272
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => DatePickerComponent), multi: true },
9817
9273
  { provide: KendoInput, useExisting: forwardRef(() => DatePickerComponent) },
@@ -9859,6 +9315,12 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
9859
9315
  [min]="min"
9860
9316
  [max]="max"
9861
9317
  [incompleteDateValidation]="incompleteDateValidation"
9318
+ [autoCorrectParts]="autoCorrectParts"
9319
+ [autoSwitchParts]="autoSwitchParts"
9320
+ [autoSwitchKeys]="autoSwitchKeys"
9321
+ [enableMouseWheel]="enableMouseWheel"
9322
+ [allowCaretMode]="allowCaretMode"
9323
+ [autoFill]="autoFill"
9862
9324
  fillMode="none"
9863
9325
  rounded="none"
9864
9326
  size="none"
@@ -9914,6 +9376,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
9914
9376
  <div class="k-actionsheet-actions">
9915
9377
  <button
9916
9378
  kendoButton
9379
+ type="button"
9917
9380
  icon="x"
9918
9381
  [attr.title]="localization.get('clearTitle')"
9919
9382
  [svgIcon]="xIcon"
@@ -9972,7 +9435,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
9972
9435
  </kendo-calendar-messages>
9973
9436
  </kendo-calendar>
9974
9437
  </ng-template>
9975
- `, 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", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "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 });
9438
+ `, 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 });
9976
9439
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DatePickerComponent, decorators: [{
9977
9440
  type: Component,
9978
9441
  args: [{
@@ -10028,6 +9491,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
10028
9491
  [min]="min"
10029
9492
  [max]="max"
10030
9493
  [incompleteDateValidation]="incompleteDateValidation"
9494
+ [autoCorrectParts]="autoCorrectParts"
9495
+ [autoSwitchParts]="autoSwitchParts"
9496
+ [autoSwitchKeys]="autoSwitchKeys"
9497
+ [enableMouseWheel]="enableMouseWheel"
9498
+ [allowCaretMode]="allowCaretMode"
9499
+ [autoFill]="autoFill"
10031
9500
  fillMode="none"
10032
9501
  rounded="none"
10033
9502
  size="none"
@@ -10083,6 +9552,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
10083
9552
  <div class="k-actionsheet-actions">
10084
9553
  <button
10085
9554
  kendoButton
9555
+ type="button"
10086
9556
  icon="x"
10087
9557
  [attr.title]="localization.get('clearTitle')"
10088
9558
  [svgIcon]="xIcon"
@@ -10236,6 +9706,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
10236
9706
  type: Input
10237
9707
  }], incompleteDateValidation: [{
10238
9708
  type: Input
9709
+ }], autoCorrectParts: [{
9710
+ type: Input
9711
+ }], autoSwitchParts: [{
9712
+ type: Input
9713
+ }], autoSwitchKeys: [{
9714
+ type: Input
9715
+ }], enableMouseWheel: [{
9716
+ type: Input
9717
+ }], allowCaretMode: [{
9718
+ type: Input
9719
+ }], autoFill: [{
9720
+ type: Input
10239
9721
  }], focusedDate: [{
10240
9722
  type: Input
10241
9723
  }], value: [{
@@ -12221,6 +11703,37 @@ class TimePickerComponent {
12221
11703
  * Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
12222
11704
  */
12223
11705
  this.incompleteDateValidation = false;
11706
+ /**
11707
+ * @hidden
11708
+ *
11709
+ * Determines whether to auto correct invalid segments automatically.
11710
+ * TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
11711
+ *
11712
+ * @default true
11713
+ */
11714
+ this.autoCorrectParts = true;
11715
+ /**
11716
+ * Determines whether to automatically move to the next segment after the user completes the current one.
11717
+ *
11718
+ * @default true
11719
+ */
11720
+ this.autoSwitchParts = true;
11721
+ /**
11722
+ * A string array representing custom keys, which will move the focus to the next date format segment.
11723
+ */
11724
+ this.autoSwitchKeys = [];
11725
+ /**
11726
+ * Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
11727
+ *
11728
+ * @default true
11729
+ */
11730
+ this.enableMouseWheel = true;
11731
+ /**
11732
+ * Determines if the users should see a blinking caret inside the Date Input when possible.
11733
+ *
11734
+ * @default false
11735
+ */
11736
+ this.allowCaretMode = false;
12224
11737
  /**
12225
11738
  * Determines whether to display the **Cancel** button in the popup.
12226
11739
  */
@@ -13070,7 +12583,7 @@ class TimePickerComponent {
13070
12583
  }
13071
12584
  }
13072
12585
  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 });
13073
- 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: [
12586
+ 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: [
13074
12587
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TimePickerComponent), multi: true },
13075
12588
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => TimePickerComponent), multi: true },
13076
12589
  { provide: KendoInput, useExisting: forwardRef(() => TimePickerComponent) },
@@ -13136,6 +12649,11 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
13136
12649
  [min]="normalizeTime(min)"
13137
12650
  [max]="normalizeTime(max)"
13138
12651
  [incompleteDateValidation]="incompleteDateValidation"
12652
+ [autoCorrectParts]="autoCorrectParts"
12653
+ [autoSwitchParts]="autoSwitchParts"
12654
+ [autoSwitchKeys]="autoSwitchKeys"
12655
+ [enableMouseWheel]="enableMouseWheel"
12656
+ [allowCaretMode]="allowCaretMode"
13139
12657
  [fillMode]="fillMode"
13140
12658
  [rounded]="rounded"
13141
12659
  [size]="size"
@@ -13188,6 +12706,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
13188
12706
  <div class="k-actionsheet-actions">
13189
12707
  <button
13190
12708
  kendoButton
12709
+ type="button"
13191
12710
  icon="x"
13192
12711
  [attr.title]="localization.get('clearTitle')"
13193
12712
  [svgIcon]="xIcon"
@@ -13206,6 +12725,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
13206
12725
  </div>
13207
12726
  <div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
13208
12727
  <button kendoButton
12728
+ type="button"
13209
12729
  (click)="handleReject()"
13210
12730
  size="large"
13211
12731
  [attr.title]="localization.get('cancelLabel')"
@@ -13215,6 +12735,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
13215
12735
  </button>
13216
12736
 
13217
12737
  <button kendoButton
12738
+ type="button"
13218
12739
  (click)="handleActionSheetAccept()"
13219
12740
  size="large"
13220
12741
  themeColor="primary"
@@ -13265,7 +12786,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
13265
12786
  </kendo-timeselector-messages>
13266
12787
  </kendo-timeselector>
13267
12788
  </ng-template>
13268
- `, 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", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "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 });
12789
+ `, 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 });
13269
12790
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimePickerComponent, decorators: [{
13270
12791
  type: Component,
13271
12792
  args: [{
@@ -13339,6 +12860,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
13339
12860
  [min]="normalizeTime(min)"
13340
12861
  [max]="normalizeTime(max)"
13341
12862
  [incompleteDateValidation]="incompleteDateValidation"
12863
+ [autoCorrectParts]="autoCorrectParts"
12864
+ [autoSwitchParts]="autoSwitchParts"
12865
+ [autoSwitchKeys]="autoSwitchKeys"
12866
+ [enableMouseWheel]="enableMouseWheel"
12867
+ [allowCaretMode]="allowCaretMode"
13342
12868
  [fillMode]="fillMode"
13343
12869
  [rounded]="rounded"
13344
12870
  [size]="size"
@@ -13391,6 +12917,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
13391
12917
  <div class="k-actionsheet-actions">
13392
12918
  <button
13393
12919
  kendoButton
12920
+ type="button"
13394
12921
  icon="x"
13395
12922
  [attr.title]="localization.get('clearTitle')"
13396
12923
  [svgIcon]="xIcon"
@@ -13409,6 +12936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
13409
12936
  </div>
13410
12937
  <div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
13411
12938
  <button kendoButton
12939
+ type="button"
13412
12940
  (click)="handleReject()"
13413
12941
  size="large"
13414
12942
  [attr.title]="localization.get('cancelLabel')"
@@ -13418,6 +12946,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
13418
12946
  </button>
13419
12947
 
13420
12948
  <button kendoButton
12949
+ type="button"
13421
12950
  (click)="handleActionSheetAccept()"
13422
12951
  size="large"
13423
12952
  themeColor="primary"
@@ -13507,6 +13036,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
13507
13036
  type: Input
13508
13037
  }], incompleteDateValidation: [{
13509
13038
  type: Input
13039
+ }], autoCorrectParts: [{
13040
+ type: Input
13041
+ }], autoSwitchParts: [{
13042
+ type: Input
13043
+ }], autoSwitchKeys: [{
13044
+ type: Input
13045
+ }], enableMouseWheel: [{
13046
+ type: Input
13047
+ }], allowCaretMode: [{
13048
+ type: Input
13510
13049
  }], cancelButton: [{
13511
13050
  type: Input
13512
13051
  }], nowButton: [{
@@ -13719,7 +13258,14 @@ class DateTimePickerComponent {
13719
13258
  * Configures the incremental steps of the DateInput and the popup component of the TimePicker
13720
13259
  * ([see example]({% slug incrementalsteps_datetimepicker %})).
13721
13260
  */
13722
- this.steps = {};
13261
+ this.steps = {
13262
+ second: 1,
13263
+ minute: 1,
13264
+ hour: 1,
13265
+ day: 1,
13266
+ month: 1,
13267
+ year: 1
13268
+ };
13723
13269
  /**
13724
13270
  * Specifies the Calendar type.
13725
13271
  *
@@ -13758,6 +13304,43 @@ class DateTimePickerComponent {
13758
13304
  * Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
13759
13305
  */
13760
13306
  this.incompleteDateValidation = false;
13307
+ /**
13308
+ * @hidden
13309
+ *
13310
+ * Determines whether to auto correct invalid segments automatically.
13311
+ * TODO: To be fixed in common package before enabling: https://github.com/telerik/kendo-dateinputs-common/issues/24
13312
+ *
13313
+ * @default true
13314
+ */
13315
+ this.autoCorrectParts = true;
13316
+ /**
13317
+ * Determines whether to automatically move to the next segment after the user completes the current one.
13318
+ *
13319
+ * @default true
13320
+ */
13321
+ this.autoSwitchParts = true;
13322
+ /**
13323
+ * A string array representing custom keys, which will move the focus to the next date format segment.
13324
+ */
13325
+ this.autoSwitchKeys = [];
13326
+ /**
13327
+ * Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
13328
+ *
13329
+ * @default true
13330
+ */
13331
+ this.enableMouseWheel = true;
13332
+ /**
13333
+ * Determines if the users should see a blinking caret inside the Date Input when possible.
13334
+ *
13335
+ * @default false
13336
+ */
13337
+ this.allowCaretMode = false;
13338
+ /**
13339
+ * When enabled, the DateTimePicker will autofill the rest of the date to the current date when the component loses focus.
13340
+ *
13341
+ * @default false
13342
+ */
13343
+ this.autoFill = false;
13761
13344
  /**
13762
13345
  * Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
13763
13346
  */
@@ -14810,7 +14393,7 @@ class DateTimePickerComponent {
14810
14393
  }
14811
14394
  }
14812
14395
  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 });
14813
- 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: [
14396
+ 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: [
14814
14397
  PickerService,
14815
14398
  LocalizationService,
14816
14399
  DisabledDatesService,
@@ -14891,6 +14474,12 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14891
14474
  [min]="min"
14892
14475
  [max]="max"
14893
14476
  [incompleteDateValidation]="incompleteDateValidation"
14477
+ [autoCorrectParts]="autoCorrectParts"
14478
+ [autoSwitchParts]="autoSwitchParts"
14479
+ [autoSwitchKeys]="autoSwitchKeys"
14480
+ [enableMouseWheel]="enableMouseWheel"
14481
+ [allowCaretMode]="allowCaretMode"
14482
+ [autoFill]="autoFill"
14894
14483
  [formatPlaceholder]="formatPlaceholder"
14895
14484
  [placeholder]="placeholder"
14896
14485
  [disabled]="disabled"
@@ -14968,6 +14557,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14968
14557
  <div class="k-actionsheet-actions">
14969
14558
  <button
14970
14559
  kendoButton
14560
+ type="button"
14971
14561
  icon="x"
14972
14562
  [attr.title]="localization.get('clearTitle')"
14973
14563
  [svgIcon]="xIcon"
@@ -14986,6 +14576,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14986
14576
  </div>
14987
14577
  <div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
14988
14578
  <button kendoButton
14579
+ type="button"
14989
14580
  (click)="handleCancel()"
14990
14581
  size="large"
14991
14582
  [attr.title]="localization.get('cancelLabel')"
@@ -14995,6 +14586,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14995
14586
  </button>
14996
14587
 
14997
14588
  <button kendoButton
14589
+ type="button"
14998
14590
  (click)="handleAccept()"
14999
14591
  size="large"
15000
14592
  themeColor="primary"
@@ -15170,7 +14762,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
15170
14762
  </div>
15171
14763
  </div>
15172
14764
  </ng-template>
15173
- `, 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", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "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 });
14765
+ `, 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 });
15174
14766
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerComponent, decorators: [{
15175
14767
  type: Component,
15176
14768
  args: [{
@@ -15259,6 +14851,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15259
14851
  [min]="min"
15260
14852
  [max]="max"
15261
14853
  [incompleteDateValidation]="incompleteDateValidation"
14854
+ [autoCorrectParts]="autoCorrectParts"
14855
+ [autoSwitchParts]="autoSwitchParts"
14856
+ [autoSwitchKeys]="autoSwitchKeys"
14857
+ [enableMouseWheel]="enableMouseWheel"
14858
+ [allowCaretMode]="allowCaretMode"
14859
+ [autoFill]="autoFill"
15262
14860
  [formatPlaceholder]="formatPlaceholder"
15263
14861
  [placeholder]="placeholder"
15264
14862
  [disabled]="disabled"
@@ -15336,6 +14934,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15336
14934
  <div class="k-actionsheet-actions">
15337
14935
  <button
15338
14936
  kendoButton
14937
+ type="button"
15339
14938
  icon="x"
15340
14939
  [attr.title]="localization.get('clearTitle')"
15341
14940
  [svgIcon]="xIcon"
@@ -15354,6 +14953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15354
14953
  </div>
15355
14954
  <div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
15356
14955
  <button kendoButton
14956
+ type="button"
15357
14957
  (click)="handleCancel()"
15358
14958
  size="large"
15359
14959
  [attr.title]="localization.get('cancelLabel')"
@@ -15363,6 +14963,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15363
14963
  </button>
15364
14964
 
15365
14965
  <button kendoButton
14966
+ type="button"
15366
14967
  (click)="handleAccept()"
15367
14968
  size="large"
15368
14969
  themeColor="primary"
@@ -15605,6 +15206,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15605
15206
  type: Input
15606
15207
  }], incompleteDateValidation: [{
15607
15208
  type: Input
15209
+ }], autoCorrectParts: [{
15210
+ type: Input
15211
+ }], autoSwitchParts: [{
15212
+ type: Input
15213
+ }], autoSwitchKeys: [{
15214
+ type: Input
15215
+ }], enableMouseWheel: [{
15216
+ type: Input
15217
+ }], allowCaretMode: [{
15218
+ type: Input
15219
+ }], autoFill: [{
15220
+ type: Input
15608
15221
  }], adaptiveMode: [{
15609
15222
  type: Input
15610
15223
  }], valueChange: [{
@@ -16638,6 +16251,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
16638
16251
  <div class="k-actionsheet-actions">
16639
16252
  <button
16640
16253
  kendoButton
16254
+ type="button"
16641
16255
  icon="x"
16642
16256
  [attr.title]="localization.get('clearTitle')"
16643
16257
  [svgIcon]="xIcon"
@@ -16663,6 +16277,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
16663
16277
  </div>
16664
16278
  <div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
16665
16279
  <button kendoButton
16280
+ type="button"
16666
16281
  size="large"
16667
16282
  [attr.title]="localization.get('cancelLabel')"
16668
16283
  [attr.aria-label]="localization.get('cancelLabel')"
@@ -16672,6 +16287,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
16672
16287
  </button>
16673
16288
 
16674
16289
  <button kendoButton
16290
+ type="button"
16675
16291
  size="large"
16676
16292
  themeColor="primary"
16677
16293
  [attr.title]="localization.get('acceptLabel')"
@@ -16735,6 +16351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
16735
16351
  <div class="k-actionsheet-actions">
16736
16352
  <button
16737
16353
  kendoButton
16354
+ type="button"
16738
16355
  icon="x"
16739
16356
  [attr.title]="localization.get('clearTitle')"
16740
16357
  [svgIcon]="xIcon"
@@ -16760,6 +16377,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
16760
16377
  </div>
16761
16378
  <div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
16762
16379
  <button kendoButton
16380
+ type="button"
16763
16381
  size="large"
16764
16382
  [attr.title]="localization.get('cancelLabel')"
16765
16383
  [attr.aria-label]="localization.get('cancelLabel')"
@@ -16769,6 +16387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
16769
16387
  </button>
16770
16388
 
16771
16389
  <button kendoButton
16390
+ type="button"
16772
16391
  size="large"
16773
16392
  themeColor="primary"
16774
16393
  [attr.title]="localization.get('acceptLabel')"