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