@progress/kendo-angular-dateinputs 5.3.1-dev.202112201533 → 6.0.0

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.
Files changed (74) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-dateinputs.js +2 -2
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/calendar/calendar.component.js +1 -1
  7. package/dist/es/calendar/header.component.js +1 -1
  8. package/dist/es/calendar/multiview-calendar.component.js +11 -4
  9. package/dist/es/calendar/services/dom.service.js +1 -1
  10. package/dist/es/calendar/view.component.js +1 -1
  11. package/dist/es/common/models/fillmode.js +4 -0
  12. package/dist/es/common/models/rounded.js +4 -0
  13. package/dist/es/common/models/size.js +4 -0
  14. package/dist/es/dateinput/dateinput.component.js +143 -18
  15. package/dist/es/datepicker/datepicker.component.js +130 -13
  16. package/dist/es/daterange/date-range-input.js +1 -1
  17. package/dist/es/datetimepicker/datetimepicker.component.js +147 -11
  18. package/dist/es/package-metadata.js +1 -1
  19. package/dist/es/timepicker/services/dom.service.js +12 -8
  20. package/dist/es/timepicker/timelist.component.js +3 -2
  21. package/dist/es/timepicker/timepicker.component.js +130 -13
  22. package/dist/es/timepicker/timeselector.component.js +2 -2
  23. package/dist/es/util.js +37 -0
  24. package/dist/es2015/calendar/calendar.component.js +1 -1
  25. package/dist/es2015/calendar/header.component.js +4 -4
  26. package/dist/es2015/calendar/multiview-calendar.component.d.ts +3 -1
  27. package/dist/es2015/calendar/multiview-calendar.component.js +11 -4
  28. package/dist/es2015/calendar/services/dom.service.js +1 -1
  29. package/dist/es2015/calendar/view.component.js +1 -1
  30. package/dist/es2015/common/models/fillmode.d.ts +14 -0
  31. package/dist/es2015/common/models/fillmode.js +4 -0
  32. package/dist/es2015/common/models/rounded.d.ts +15 -0
  33. package/dist/es2015/common/models/rounded.js +4 -0
  34. package/dist/es2015/common/models/size.d.ts +14 -0
  35. package/dist/es2015/common/models/size.js +4 -0
  36. package/dist/es2015/dateinput/dateinput.component.d.ts +49 -8
  37. package/dist/es2015/dateinput/dateinput.component.js +183 -68
  38. package/dist/es2015/datepicker/datepicker.component.d.ts +47 -5
  39. package/dist/es2015/datepicker/datepicker.component.js +155 -49
  40. package/dist/es2015/daterange/date-range-input.js +1 -1
  41. package/dist/es2015/datetimepicker/datetimepicker.component.d.ts +56 -6
  42. package/dist/es2015/datetimepicker/datetimepicker.component.js +186 -63
  43. package/dist/es2015/index.metadata.json +1 -1
  44. package/dist/es2015/package-metadata.js +1 -1
  45. package/dist/es2015/timepicker/services/dom.service.d.ts +1 -0
  46. package/dist/es2015/timepicker/services/dom.service.js +12 -8
  47. package/dist/es2015/timepicker/timelist.component.js +3 -2
  48. package/dist/es2015/timepicker/timepicker.component.d.ts +50 -5
  49. package/dist/es2015/timepicker/timepicker.component.js +174 -69
  50. package/dist/es2015/timepicker/timeselector.component.js +7 -5
  51. package/dist/es2015/util.d.ts +18 -0
  52. package/dist/es2015/util.js +37 -0
  53. package/dist/fesm2015/index.js +780 -282
  54. package/dist/fesm5/index.js +625 -83
  55. package/dist/npm/calendar/calendar.component.js +1 -1
  56. package/dist/npm/calendar/header.component.js +1 -1
  57. package/dist/npm/calendar/multiview-calendar.component.js +10 -3
  58. package/dist/npm/calendar/services/dom.service.js +1 -1
  59. package/dist/npm/calendar/view.component.js +1 -1
  60. package/dist/npm/common/models/fillmode.js +6 -0
  61. package/dist/npm/common/models/rounded.js +6 -0
  62. package/dist/npm/common/models/size.js +6 -0
  63. package/dist/npm/dateinput/dateinput.component.js +142 -17
  64. package/dist/npm/datepicker/datepicker.component.js +129 -12
  65. package/dist/npm/daterange/date-range-input.js +1 -1
  66. package/dist/npm/datetimepicker/datetimepicker.component.js +146 -10
  67. package/dist/npm/package-metadata.js +1 -1
  68. package/dist/npm/timepicker/services/dom.service.js +15 -10
  69. package/dist/npm/timepicker/timelist.component.js +3 -2
  70. package/dist/npm/timepicker/timepicker.component.js +129 -12
  71. package/dist/npm/timepicker/timeselector.component.js +2 -2
  72. package/dist/npm/util.js +37 -0
  73. package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
  74. package/package.json +7 -7
@@ -1095,7 +1095,7 @@ var CalendarComponent = /** @class */ (function () {
1095
1095
  ], CalendarComponent.prototype, "calendarTabIndex", null);
1096
1096
  tslib_1.__decorate([
1097
1097
  core_1.HostBinding('attr.aria-disabled'),
1098
- core_1.HostBinding('class.k-state-disabled'),
1098
+ core_1.HostBinding('class.k-disabled'),
1099
1099
  tslib_1.__metadata("design:type", Boolean),
1100
1100
  tslib_1.__metadata("design:paramtypes", [])
1101
1101
  ], CalendarComponent.prototype, "ariaDisabled", null);
@@ -159,7 +159,7 @@ var HeaderComponent = /** @class */ (function () {
159
159
  HeaderComponent = tslib_1.__decorate([
160
160
  core_1.Component({
161
161
  selector: 'kendo-calendar-header',
162
- template: "\n <span class=\"k-button k-flat k-title k-calendar-title\" [class.k-state-disabled]=\"!navigate\"\n [kendoEventsOutsideAngular]=\"{\n click: handleNavigation\n }\"\n [scope]=\"this\">\n <ng-template [ngIf]=\"!templateRef\">{{title}}</ng-template>\n <ng-template\n [ngIf]=\"templateRef\"\n [ngTemplateOutlet]=\"templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: title, activeView: activeViewValue, date: currentDate }\"\n ></ng-template>\n </span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-flat k-icon-button k-prev-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isPrevDisabled\"\n [disabled]=\"isPrevDisabled\"\n [title]=\"prevButtonTitle\"\n (click)=\"prevButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-left\"></span>\n </button>\n <span\n class=\"k-today k-nav-today\"\n [class.k-state-disabled]=\"!todayAvailable\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTodayClick\n }\"\n [scope]=\"this\"\n >\n {{ todayMessage }}\n </span>\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-flat k-icon-button k-next-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isNextDisabled\"\n [disabled]=\"isNextDisabled\"\n [title]=\"nextButtonTitle\"\n (click)=\"nextButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-right\"></span>\n </button>\n </span>\n "
162
+ template: "\n <span class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title\" [class.k-disabled]=\"!navigate\"\n [kendoEventsOutsideAngular]=\"{\n click: handleNavigation\n }\"\n [scope]=\"this\">\n <ng-template [ngIf]=\"!templateRef\">{{title}}</ng-template>\n <ng-template\n [ngIf]=\"templateRef\"\n [ngTemplateOutlet]=\"templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: title, activeView: activeViewValue, date: currentDate }\"\n ></ng-template>\n </span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-prev-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isPrevDisabled\"\n [disabled]=\"isPrevDisabled\"\n [title]=\"prevButtonTitle\"\n (click)=\"prevButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-left\"></span>\n </button>\n <span\n class=\"k-today k-nav-today\"\n [class.k-disabled]=\"!todayAvailable\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTodayClick\n }\"\n [scope]=\"this\"\n >\n {{ todayMessage }}\n </span>\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-next-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isNextDisabled\"\n [disabled]=\"isNextDisabled\"\n [title]=\"nextButtonTitle\"\n (click)=\"nextButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-right\"></span>\n </button>\n </span>\n "
163
163
  }),
164
164
  tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
165
165
  core_1.ChangeDetectorRef,
@@ -32,6 +32,7 @@ var defaults_1 = require("../defaults");
32
32
  var util_1 = require("../util");
33
33
  var rxjs_1 = require("rxjs");
34
34
  var utils_1 = require("../common/utils");
35
+ var picker_service_1 = require("../common/picker.service");
35
36
  var BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
36
37
  var TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
37
38
  var MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
@@ -68,7 +69,7 @@ exports.RANGE_CALENDAR_RANGE_VALIDATORS = {
68
69
  * ```
69
70
  */
70
71
  var MultiViewCalendarComponent = /** @class */ (function () {
71
- function MultiViewCalendarComponent(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
72
+ function MultiViewCalendarComponent(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService, pickerService) {
72
73
  this.bus = bus;
73
74
  this.element = element;
74
75
  this.navigator = navigator;
@@ -77,6 +78,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
77
78
  this.zone = zone;
78
79
  this.disabledDatesService = disabledDatesService;
79
80
  this.selectionService = selectionService;
81
+ this.pickerService = pickerService;
80
82
  /**
81
83
  * @hidden
82
84
  */
@@ -499,6 +501,9 @@ var MultiViewCalendarComponent = /** @class */ (function () {
499
501
  return;
500
502
  }
501
503
  if (event.keyCode === kendo_angular_common_1.Keys.Enter) {
504
+ if (utils_1.isPresent(this.pickerService)) {
505
+ event.preventDefault(); // Don't submit form from Datepicker popup
506
+ }
502
507
  this.performSelection(this.focusedDate, event);
503
508
  }
504
509
  var candidate = util_1.dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
@@ -990,7 +995,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
990
995
  ], MultiViewCalendarComponent.prototype, "calendarTabIndex", null);
991
996
  tslib_1.__decorate([
992
997
  core_1.HostBinding('attr.aria-disabled'),
993
- core_1.HostBinding('class.k-state-disabled'),
998
+ core_1.HostBinding('class.k-disabled'),
994
999
  tslib_1.__metadata("design:type", Boolean),
995
1000
  tslib_1.__metadata("design:paramtypes", [])
996
1001
  ], MultiViewCalendarComponent.prototype, "ariaDisabled", null);
@@ -1061,6 +1066,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
1061
1066
  selector: 'kendo-multiviewcalendar',
1062
1067
  template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })\"\n (prevButtonClick)=\"navigateView(prevView)\"\n (nextButtonClick)=\"navigateView(nextView)\"\n [kendoEventsOutsideAngular]=\"{\n focusin: handleHeaderFocus\n }\"\n [scope]=\"this\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || (isHovered && !isHeaderActive)\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [views]=\"views\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [animateNavigation]=\"animateNavigation\"\n [showViewHeader]=\"showViewHeader\"\n [weekNumber]=\"weekNumber\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [selectionRange]=\"selectionRange\"\n [selectedDates]=\"selectedDates\"\n (valueChange)=\"handleDateChange($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (cellEnter)=\"emitCellEvent(cellEnter, $event)\"\n (cellLeave)=\"emitCellEvent(cellLeave, $event)\"\n (activeDateChange)=\"setActiveDate($event)\"\n >\n </kendo-calendar-horizontal>\n "
1063
1068
  }),
1069
+ tslib_1.__param(8, core_1.Optional()),
1064
1070
  tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
1065
1071
  core_1.ElementRef,
1066
1072
  navigation_service_1.NavigationService,
@@ -1068,7 +1074,8 @@ var MultiViewCalendarComponent = /** @class */ (function () {
1068
1074
  core_1.ChangeDetectorRef,
1069
1075
  core_1.NgZone,
1070
1076
  disabled_dates_service_1.DisabledDatesService,
1071
- selection_service_1.SelectionService])
1077
+ selection_service_1.SelectionService,
1078
+ picker_service_1.PickerService])
1072
1079
  ], MultiViewCalendarComponent);
1073
1080
  return MultiViewCalendarComponent;
1074
1081
  }());
@@ -19,7 +19,7 @@ var tr = util_1.domContainerFactory('tr');
19
19
  var tbody = util_1.domContainerFactory('tbody');
20
20
  var thead = util_1.domContainerFactory('thead');
21
21
  var table = util_1.domContainerFactory('table');
22
- var monthHeader = function () { return (div("\n <span class=\"k-button k-flat k-title k-calendar-title\">March 2017</span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <span class=\"k-today k-nav-today\">TODAY</span>\n </span>\n ", 'k-calendar-header k-hstack')); };
22
+ var monthHeader = function () { return (div("\n <span class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title\">March 2017</span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <span class=\"k-today k-nav-today\">TODAY</span>\n </span>\n ", 'k-calendar-header k-hstack')); };
23
23
  var ɵ0 = monthHeader;
24
24
  exports.ɵ0 = ɵ0;
25
25
  var monthWeekHeader = function () { return (table([
@@ -124,7 +124,7 @@ var ViewComponent = /** @class */ (function () {
124
124
  'k-state-selected': !context.isOtherMonth && (context.isSelected || isRangeStart || isRangeEnd),
125
125
  'k-today': !context.isOtherMonth && context.isToday,
126
126
  'k-weekend': context.isWeekend,
127
- 'k-state-disabled': context.isDisabled,
127
+ 'k-disabled': context.isDisabled,
128
128
  'k-other-month': context.isOtherMonth
129
129
  });
130
130
  };
@@ -0,0 +1,6 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -457,11 +457,11 @@ var KendoDate = /** @class */ (function () {
457
457
  * Represents the [Kendo UI DateInput component for Angular]({% slug overview_dateinput %}#toc-basic-usage).
458
458
  */
459
459
  var DateInputComponent = /** @class */ (function () {
460
- function DateInputComponent(cdr, intl, renderer, element, ngZone, injector, localization, pickerService) {
460
+ function DateInputComponent(cdr, intl, renderer, wrapper, ngZone, injector, localization, pickerService) {
461
461
  this.cdr = cdr;
462
462
  this.intl = intl;
463
463
  this.renderer = renderer;
464
- this.element = element;
464
+ this.wrapper = wrapper;
465
465
  this.ngZone = ngZone;
466
466
  this.injector = injector;
467
467
  this.localization = localization;
@@ -663,6 +663,9 @@ var DateInputComponent = /** @class */ (function () {
663
663
  this.onControlChange = util_1.noop;
664
664
  this.onControlTouched = util_1.noop;
665
665
  this.onValidatorChange = util_1.noop;
666
+ this._size = 'medium';
667
+ this._rounded = 'medium';
668
+ this._fillMode = 'solid';
666
669
  this.symbolsMap = this.dateSymbolMap();
667
670
  this.updateFormatSections();
668
671
  if (this.pickerService) {
@@ -703,6 +706,83 @@ var DateInputComponent = /** @class */ (function () {
703
706
  enumerable: true,
704
707
  configurable: true
705
708
  });
709
+ Object.defineProperty(DateInputComponent.prototype, "size", {
710
+ get: function () {
711
+ return this._size;
712
+ },
713
+ /**
714
+ * Sets the size of the component.
715
+ *
716
+ * The possible values are:
717
+ * * `'small'`
718
+ * * `'medium'` (Default)
719
+ * * `'large'`
720
+ * * `null`
721
+ *
722
+ */
723
+ set: function (size) {
724
+ this.renderer.removeClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
725
+ if (size) {
726
+ this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', size));
727
+ }
728
+ this._size = size;
729
+ },
730
+ enumerable: true,
731
+ configurable: true
732
+ });
733
+ Object.defineProperty(DateInputComponent.prototype, "rounded", {
734
+ get: function () {
735
+ return this._rounded;
736
+ },
737
+ /**
738
+ * Sets the border radius of the component.
739
+ *
740
+ * The possible values are:
741
+ * * `'small'`
742
+ * * `'medium'` (Default)
743
+ * * `'large'`
744
+ * * `'full'`
745
+ * * `null`
746
+ *
747
+ */
748
+ set: function (rounded) {
749
+ this.renderer.removeClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
750
+ if (rounded) {
751
+ this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(rounded));
752
+ }
753
+ this._rounded = rounded;
754
+ },
755
+ enumerable: true,
756
+ configurable: true
757
+ });
758
+ Object.defineProperty(DateInputComponent.prototype, "fillMode", {
759
+ get: function () {
760
+ return this._fillMode;
761
+ },
762
+ /**
763
+ * Sets the fillMode of the component.
764
+ *
765
+ * The possible values are:
766
+ * * `'solid'` (Default)
767
+ * * `'flat'`
768
+ * * `'outline'`
769
+ * * `null`
770
+ *
771
+ */
772
+ set: function (fillMode) {
773
+ this.renderer.removeClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
774
+ if (fillMode) {
775
+ this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', fillMode));
776
+ if (this.spinners && this.spinup && this.spindown) {
777
+ this.setSpinnerFill(this.spinup.nativeElement, fillMode, this.fillMode);
778
+ this.setSpinnerFill(this.spindown.nativeElement, fillMode, this.fillMode);
779
+ }
780
+ }
781
+ this._fillMode = fillMode;
782
+ },
783
+ enumerable: true,
784
+ configurable: true
785
+ });
706
786
  Object.defineProperty(DateInputComponent.prototype, "wrapperClass", {
707
787
  get: function () {
708
788
  return true;
@@ -737,16 +817,16 @@ var DateInputComponent = /** @class */ (function () {
737
817
  },
738
818
  set: function (value) {
739
819
  this._active = value;
740
- if (!this.wrap) {
820
+ if (!this.wrapper) {
741
821
  return;
742
822
  }
743
823
  if (!utils_1.isPresent(this.pickerService)) {
744
- var element = this.wrap.nativeElement;
824
+ var element = this.wrapper.nativeElement;
745
825
  if (value) {
746
- this.renderer.addClass(element, 'k-state-focused');
826
+ this.renderer.addClass(element, 'k-focus');
747
827
  }
748
828
  else {
749
- this.renderer.removeClass(element, 'k-state-focused');
829
+ this.renderer.removeClass(element, 'k-focus');
750
830
  }
751
831
  }
752
832
  },
@@ -795,7 +875,7 @@ var DateInputComponent = /** @class */ (function () {
795
875
  */
796
876
  DateInputComponent.prototype.containsElement = function (element) {
797
877
  var _this = this;
798
- return Boolean(dom_queries_1.closest(element, function (node) { return node === _this.element.nativeElement; }));
878
+ return Boolean(dom_queries_1.closest(element, function (node) { return node === _this.wrapper.nativeElement; }));
799
879
  };
800
880
  /**
801
881
  * @hidden
@@ -848,13 +928,16 @@ var DateInputComponent = /** @class */ (function () {
848
928
  this.updateElementValue();
849
929
  this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
850
930
  this.ngControl = this.injector.get(forms_1.NgControl, null);
851
- if (this.element) {
852
- this.renderer.removeAttribute(this.element.nativeElement, 'tabindex');
931
+ if (this.wrapper) {
932
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
853
933
  this.ngZone.runOutsideAngular(function () {
854
934
  _this.bindEvents();
855
935
  });
856
936
  }
857
937
  };
938
+ DateInputComponent.prototype.ngAfterViewInit = function () {
939
+ this.setComponentClasses();
940
+ };
858
941
  /**
859
942
  * @hidden
860
943
  */
@@ -1208,7 +1291,7 @@ var DateInputComponent = /** @class */ (function () {
1208
1291
  }
1209
1292
  };
1210
1293
  DateInputComponent.prototype.bindEvents = function () {
1211
- var element = this.element.nativeElement;
1294
+ var element = this.wrapper.nativeElement;
1212
1295
  var mousewheelHandler = this.handleMouseWheel.bind(this);
1213
1296
  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)));
1214
1297
  };
@@ -1340,6 +1423,29 @@ var DateInputComponent = /** @class */ (function () {
1340
1423
  this.pickerService.dateCompletenessChange.emit();
1341
1424
  }
1342
1425
  };
1426
+ DateInputComponent.prototype.setSpinnerFill = function (spinner, fill, oldFill) {
1427
+ if (oldFill) {
1428
+ this.renderer.removeClass(spinner, "k-button-" + oldFill);
1429
+ this.renderer.removeClass(spinner, "k-button-" + oldFill + "-base");
1430
+ }
1431
+ this.renderer.addClass(spinner, "k-button-" + fill);
1432
+ this.renderer.addClass(spinner, "k-button-" + fill + "-base");
1433
+ };
1434
+ DateInputComponent.prototype.setComponentClasses = function () {
1435
+ if (this.size) {
1436
+ this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
1437
+ }
1438
+ if (this.rounded) {
1439
+ this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
1440
+ }
1441
+ if (this.fillMode) {
1442
+ this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
1443
+ }
1444
+ if (this.spinners) {
1445
+ this.setSpinnerFill(this.spinup.nativeElement, this.fillMode);
1446
+ this.setSpinnerFill(this.spindown.nativeElement, this.fillMode);
1447
+ }
1448
+ };
1343
1449
  var DateInputComponent_1;
1344
1450
  tslib_1.__decorate([
1345
1451
  core_1.Input(),
@@ -1431,6 +1537,21 @@ var DateInputComponent = /** @class */ (function () {
1431
1537
  core_1.Input(),
1432
1538
  tslib_1.__metadata("design:type", Boolean)
1433
1539
  ], DateInputComponent.prototype, "hasPopup", void 0);
1540
+ tslib_1.__decorate([
1541
+ core_1.Input(),
1542
+ tslib_1.__metadata("design:type", String),
1543
+ tslib_1.__metadata("design:paramtypes", [String])
1544
+ ], DateInputComponent.prototype, "size", null);
1545
+ tslib_1.__decorate([
1546
+ core_1.Input(),
1547
+ tslib_1.__metadata("design:type", String),
1548
+ tslib_1.__metadata("design:paramtypes", [String])
1549
+ ], DateInputComponent.prototype, "rounded", null);
1550
+ tslib_1.__decorate([
1551
+ core_1.Input(),
1552
+ tslib_1.__metadata("design:type", String),
1553
+ tslib_1.__metadata("design:paramtypes", [String])
1554
+ ], DateInputComponent.prototype, "fillMode", null);
1434
1555
  tslib_1.__decorate([
1435
1556
  core_1.Output(),
1436
1557
  tslib_1.__metadata("design:type", core_1.EventEmitter)
@@ -1452,20 +1573,24 @@ var DateInputComponent = /** @class */ (function () {
1452
1573
  tslib_1.__metadata("design:type", core_1.ElementRef)
1453
1574
  ], DateInputComponent.prototype, "dateInput", void 0);
1454
1575
  tslib_1.__decorate([
1455
- core_1.ViewChild('wrap', { static: false }),
1456
- tslib_1.__metadata("design:type", core_1.ElementRef)
1457
- ], DateInputComponent.prototype, "wrap", void 0);
1458
- tslib_1.__decorate([
1459
- core_1.HostBinding('class.k-widget'),
1576
+ core_1.HostBinding('class.k-input'),
1460
1577
  core_1.HostBinding('class.k-dateinput'),
1461
1578
  tslib_1.__metadata("design:type", Boolean),
1462
1579
  tslib_1.__metadata("design:paramtypes", [])
1463
1580
  ], DateInputComponent.prototype, "wrapperClass", null);
1464
1581
  tslib_1.__decorate([
1465
- core_1.HostBinding('class.k-state-disabled'),
1582
+ core_1.HostBinding('class.k-disabled'),
1466
1583
  tslib_1.__metadata("design:type", Boolean),
1467
1584
  tslib_1.__metadata("design:paramtypes", [])
1468
1585
  ], DateInputComponent.prototype, "disabledClass", null);
1586
+ tslib_1.__decorate([
1587
+ core_1.ViewChild('spinup', { static: false }),
1588
+ tslib_1.__metadata("design:type", core_1.ElementRef)
1589
+ ], DateInputComponent.prototype, "spinup", void 0);
1590
+ tslib_1.__decorate([
1591
+ core_1.ViewChild('spindown', { static: false }),
1592
+ tslib_1.__metadata("design:type", core_1.ElementRef)
1593
+ ], DateInputComponent.prototype, "spindown", void 0);
1469
1594
  DateInputComponent = DateInputComponent_1 = tslib_1.__decorate([
1470
1595
  core_1.Component({
1471
1596
  changeDetection: core_1.ChangeDetectionStrategy.OnPush,
@@ -1478,7 +1603,7 @@ var DateInputComponent = /** @class */ (function () {
1478
1603
  kendo_angular_l10n_1.LocalizationService
1479
1604
  ],
1480
1605
  selector: 'kendo-dateinput',
1481
- template: "\n <ng-container kendoDateInputLocalizedMessages\n i18n-increment=\"kendo.dateinput.increment|The label for the **Increment** button in the DateInput\"\n increment=\"Increase value\"\n\n i18n-decrement=\"kendo.dateinput.decrement|The label for the **Decrement** button in the DateInput\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <span class=\"k-dateinput-wrap\" #wrap>\n <input\n #dateInput\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-input\"\n [attr.role]=\"role\"\n [attr.aria-readonly]=\"ariaReadOnly\"\n [id]=\"focusableId\"\n [title]=\"title\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [attr.aria-expanded]=\"isPopupOpen\"\n [attr.aria-haspopup]=\"hasPopup\"\n [kendoEventsOutsideAngular]=\"{\n click: handleClick,\n focus: handleFocus,\n mousedown: handleMousedown,\n touchstart: handleMousedown,\n dragstart: handleDragAndDrop,\n drop: handleDragAndDrop,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n />\n <span *ngIf=\"spinners\" class=\"k-select\" (mousedown)=\"$event.preventDefault()\">\n <span\n class=\"k-link k-link-increase\"\n [class.k-state-active]=\"arrowDirection === arrow.Up\"\n (mousedown)=\"arrowDirection = arrow.Up\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n (click)=\"handleButtonClick(1)\"\n [title]=\"localization.get('increment')\"\n [attr.aria-label]=\"localization.get('increment')\">\n <span class=\"k-icon k-i-arrow-n\"></span>\n </span>\n <span\n class=\"k-link k-link-decrease\"\n (click)=\"handleButtonClick(-1)\"\n [class.k-state-active]=\"arrowDirection === arrow.Down\"\n (mousedown)=\"arrowDirection = arrow.Down\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n [title]=\"localization.get('decrement')\"\n [attr.aria-label]=\"localization.get('decrement')\">\n <span class=\"k-icon k-i-arrow-s\"></span>\n </span>\n </span>\n </span>\n "
1606
+ template: "\n <ng-container kendoDateInputLocalizedMessages\n i18n-increment=\"kendo.dateinput.increment|The label for the **Increment** button in the DateInput\"\n increment=\"Increase value\"\n\n i18n-decrement=\"kendo.dateinput.decrement|The label for the **Decrement** button in the DateInput\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <input\n #dateInput\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-input-inner\"\n [attr.role]=\"role\"\n [attr.aria-readonly]=\"ariaReadOnly\"\n [id]=\"focusableId\"\n [title]=\"title\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [attr.aria-expanded]=\"isPopupOpen\"\n [attr.aria-haspopup]=\"hasPopup\"\n [kendoEventsOutsideAngular]=\"{\n click: handleClick,\n focus: handleFocus,\n mousedown: handleMousedown,\n touchstart: handleMousedown,\n dragstart: handleDragAndDrop,\n drop: handleDragAndDrop,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n />\n <span *ngIf=\"spinners\" class=\"k-input-spinner k-spin-button\" (mousedown)=\"$event.preventDefault()\">\n <button\n #spinup\n tabindex=\"-1\"\n class=\"k-spinner-increase k-button k-icon-button\"\n [class.k-active]=\"arrowDirection === arrow.Up\"\n (mousedown)=\"arrowDirection = arrow.Up\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n (click)=\"handleButtonClick(1)\"\n [title]=\"localization.get('increment')\"\n [attr.aria-label]=\"localization.get('increment')\">\n <span class=\"k-button-icon k-icon k-i-arrow-n\"></span>\n </button>\n <button\n #spindown\n tabindex=\"-1\"\n class=\"k-spinner-decrease k-button k-icon-button\"\n (click)=\"handleButtonClick(-1)\"\n [class.k-active]=\"arrowDirection === arrow.Down\"\n (mousedown)=\"arrowDirection = arrow.Down\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n [title]=\"localization.get('decrement')\"\n [attr.aria-label]=\"localization.get('decrement')\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n </span>\n "
1482
1607
  }),
1483
1608
  tslib_1.__param(7, core_1.Optional()),
1484
1609
  tslib_1.__metadata("design:paramtypes", [core_1.ChangeDetectorRef,