@vaadin/date-time-picker 24.0.0-alpha2 → 24.0.0-alpha4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/src/vaadin-date-time-picker.d.ts +1 -4
- package/src/vaadin-date-time-picker.js +89 -112
- package/web-types.json +3 -3
- package/web-types.lit.json +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-time-picker",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "24.0.0-
|
|
40
|
-
"@vaadin/custom-field": "24.0.0-
|
|
41
|
-
"@vaadin/date-picker": "24.0.0-
|
|
42
|
-
"@vaadin/field-base": "24.0.0-
|
|
43
|
-
"@vaadin/time-picker": "24.0.0-
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
45
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
39
|
+
"@vaadin/component-base": "24.0.0-alpha4",
|
|
40
|
+
"@vaadin/custom-field": "24.0.0-alpha4",
|
|
41
|
+
"@vaadin/date-picker": "24.0.0-alpha4",
|
|
42
|
+
"@vaadin/field-base": "24.0.0-alpha4",
|
|
43
|
+
"@vaadin/time-picker": "24.0.0-alpha4",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha4",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha4",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "66be46e82c4d0a673859fbc9bdb1581dd89f360c"
|
|
58
58
|
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
7
7
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
8
8
|
import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
|
|
9
|
-
import { SlotMixin } from '@vaadin/component-base/src/slot-mixin.js';
|
|
10
9
|
import type { DatePickerI18n } from '@vaadin/date-picker/src/vaadin-date-picker.js';
|
|
11
10
|
import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
|
|
12
11
|
import type { TimePickerI18n } from '@vaadin/time-picker/src/vaadin-time-picker.js';
|
|
@@ -104,9 +103,7 @@ export interface DateTimePickerEventMap extends DateTimePickerCustomEventMap, HT
|
|
|
104
103
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
105
104
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
106
105
|
*/
|
|
107
|
-
declare class DateTimePicker extends FieldMixin(
|
|
108
|
-
SlotMixin(DisabledMixin(FocusMixin(ThemableMixin(ElementMixin(HTMLElement))))),
|
|
109
|
-
) {
|
|
106
|
+
declare class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(ElementMixin(HTMLElement))))) {
|
|
110
107
|
/**
|
|
111
108
|
* The name of the control, which is submitted with the form data.
|
|
112
109
|
*/
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import './vaadin-date-time-picker-date-picker.js';
|
|
7
7
|
import './vaadin-date-time-picker-time-picker.js';
|
|
8
|
-
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
|
|
9
8
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
10
9
|
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
11
10
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
12
11
|
import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
|
|
13
|
-
import {
|
|
12
|
+
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
|
|
14
13
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
15
14
|
import { dateEquals, parseDate } from '@vaadin/date-picker/src/vaadin-date-picker-helper.js';
|
|
16
15
|
import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
|
|
@@ -44,6 +43,22 @@ const timePickerI18nDefaults = getPropertyFromPrototype(timePickerClass, 'i18n')
|
|
|
44
43
|
const datePickerI18nProps = Object.keys(datePickerI18nDefaults);
|
|
45
44
|
const timePickerI18nProps = Object.keys(timePickerI18nDefaults);
|
|
46
45
|
|
|
46
|
+
/**
|
|
47
|
+
* A controller to initialize slotted picker.
|
|
48
|
+
*
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
class PickerSlotController extends SlotController {
|
|
52
|
+
constructor(host, type) {
|
|
53
|
+
super(host, `${type}-picker`, `vaadin-date-time-picker-${type}-picker`, {
|
|
54
|
+
initializer: (picker, host) => {
|
|
55
|
+
const prop = `__${type}Picker`;
|
|
56
|
+
host[prop] = picker;
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
47
62
|
/**
|
|
48
63
|
* `<vaadin-date-time-picker>` is a Web Component providing a date time selection field.
|
|
49
64
|
*
|
|
@@ -105,12 +120,9 @@ const timePickerI18nProps = Object.keys(timePickerI18nDefaults);
|
|
|
105
120
|
* @mixes ThemableMixin
|
|
106
121
|
* @mixes FocusMixin
|
|
107
122
|
* @mixes DisabledMixin
|
|
108
|
-
* @mixes SlotMixin
|
|
109
123
|
* @mixes FieldMixin
|
|
110
124
|
*/
|
|
111
|
-
class DateTimePicker extends FieldMixin(
|
|
112
|
-
SlotMixin(DisabledMixin(FocusMixin(ThemableMixin(ElementMixin(PolymerElement))))),
|
|
113
|
-
) {
|
|
125
|
+
class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(ElementMixin(PolymerElement))))) {
|
|
114
126
|
static get template() {
|
|
115
127
|
return html`
|
|
116
128
|
<style>
|
|
@@ -359,39 +371,22 @@ class DateTimePicker extends FieldMixin(
|
|
|
359
371
|
static get observers() {
|
|
360
372
|
return [
|
|
361
373
|
'__selectedDateTimeChanged(__selectedDateTime)',
|
|
362
|
-
'__datePlaceholderChanged(datePlaceholder)',
|
|
363
|
-
'__timePlaceholderChanged(timePlaceholder)',
|
|
364
|
-
'__stepChanged(step)',
|
|
365
|
-
'__initialPositionChanged(initialPosition)',
|
|
366
|
-
'__showWeekNumbersChanged(showWeekNumbers)',
|
|
367
|
-
'__requiredChanged(required)',
|
|
368
|
-
'__invalidChanged(invalid)',
|
|
369
|
-
'__disabledChanged(disabled)',
|
|
370
|
-
'__readonlyChanged(readonly)',
|
|
371
|
-
'__i18nChanged(i18n
|
|
372
|
-
'__autoOpenDisabledChanged(autoOpenDisabled)',
|
|
374
|
+
'__datePlaceholderChanged(datePlaceholder, __datePicker)',
|
|
375
|
+
'__timePlaceholderChanged(timePlaceholder, __timePicker)',
|
|
376
|
+
'__stepChanged(step, __timePicker)',
|
|
377
|
+
'__initialPositionChanged(initialPosition, __datePicker)',
|
|
378
|
+
'__showWeekNumbersChanged(showWeekNumbers, __datePicker)',
|
|
379
|
+
'__requiredChanged(required, __datePicker, __timePicker)',
|
|
380
|
+
'__invalidChanged(invalid, __datePicker, __timePicker)',
|
|
381
|
+
'__disabledChanged(disabled, __datePicker, __timePicker)',
|
|
382
|
+
'__readonlyChanged(readonly, __datePicker, __timePicker)',
|
|
383
|
+
'__i18nChanged(i18n, __datePicker, __timePicker)',
|
|
384
|
+
'__autoOpenDisabledChanged(autoOpenDisabled, __datePicker, __timePicker)',
|
|
373
385
|
'__themeChanged(_theme, __datePicker, __timePicker)',
|
|
374
386
|
'__pickersChanged(__datePicker, __timePicker)',
|
|
375
387
|
];
|
|
376
388
|
}
|
|
377
389
|
|
|
378
|
-
/** @protected */
|
|
379
|
-
get slots() {
|
|
380
|
-
return {
|
|
381
|
-
...super.slots,
|
|
382
|
-
'date-picker': () => {
|
|
383
|
-
const element = document.createElement('vaadin-date-time-picker-date-picker');
|
|
384
|
-
element.__defaultPicker = true;
|
|
385
|
-
return element;
|
|
386
|
-
},
|
|
387
|
-
'time-picker': () => {
|
|
388
|
-
const element = document.createElement('vaadin-date-time-picker-time-picker');
|
|
389
|
-
element.__defaultPicker = true;
|
|
390
|
-
return element;
|
|
391
|
-
},
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
|
|
395
390
|
constructor() {
|
|
396
391
|
super();
|
|
397
392
|
// Default value for "min" and "max" properties of vaadin-date-picker (for removing constraint)
|
|
@@ -403,18 +398,17 @@ class DateTimePicker extends FieldMixin(
|
|
|
403
398
|
|
|
404
399
|
this.__changeEventHandler = this.__changeEventHandler.bind(this);
|
|
405
400
|
this.__valueChangedEventHandler = this.__valueChangedEventHandler.bind(this);
|
|
406
|
-
|
|
407
|
-
this._observer = new FlattenedNodesObserver(this, (info) => {
|
|
408
|
-
this.__onDomChange(info.addedNodes);
|
|
409
|
-
});
|
|
410
401
|
}
|
|
411
402
|
|
|
412
403
|
/** @protected */
|
|
413
404
|
ready() {
|
|
414
405
|
super.ready();
|
|
415
406
|
|
|
416
|
-
this.
|
|
417
|
-
this.
|
|
407
|
+
this._datePickerController = new PickerSlotController(this, 'date');
|
|
408
|
+
this.addController(this._datePickerController);
|
|
409
|
+
|
|
410
|
+
this._timePickerController = new PickerSlotController(this, 'time');
|
|
411
|
+
this.addController(this._timePickerController);
|
|
418
412
|
|
|
419
413
|
if (this.autofocus && !this.disabled) {
|
|
420
414
|
window.requestAnimationFrame(() => this.focus());
|
|
@@ -508,22 +502,9 @@ class DateTimePicker extends FieldMixin(
|
|
|
508
502
|
}
|
|
509
503
|
|
|
510
504
|
/** @private */
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
.forEach((node) => {
|
|
515
|
-
const slotAttributeValue = node.getAttribute('slot');
|
|
516
|
-
|
|
517
|
-
if (slotAttributeValue === 'date-picker') {
|
|
518
|
-
this.__datePicker = node;
|
|
519
|
-
} else if (slotAttributeValue === 'time-picker') {
|
|
520
|
-
this.__timePicker = node;
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
|
|
524
|
-
if (this.value && (this.min || this.max)) {
|
|
525
|
-
this.validate();
|
|
526
|
-
}
|
|
505
|
+
__isDefaultPicker(picker, type) {
|
|
506
|
+
const controller = this[`_${type}PickerController`];
|
|
507
|
+
return controller && picker === controller.defaultNode;
|
|
527
508
|
}
|
|
528
509
|
|
|
529
510
|
/** @private */
|
|
@@ -539,7 +520,7 @@ class DateTimePicker extends FieldMixin(
|
|
|
539
520
|
|
|
540
521
|
this.__addInputListeners(newDatePicker);
|
|
541
522
|
|
|
542
|
-
if (newDatePicker
|
|
523
|
+
if (this.__isDefaultPicker(newDatePicker, 'date')) {
|
|
543
524
|
// Synchronize properties to default date picker
|
|
544
525
|
newDatePicker.placeholder = this.datePlaceholder;
|
|
545
526
|
newDatePicker.invalid = this.invalid;
|
|
@@ -558,10 +539,6 @@ class DateTimePicker extends FieldMixin(
|
|
|
558
539
|
// min and max need to be dynamically set depending on currently selected date instead of simple propagation
|
|
559
540
|
newDatePicker.min = this.__formatDateISO(this.__minDateTime, this.__defaultDateMinMaxValue);
|
|
560
541
|
newDatePicker.max = this.__formatDateISO(this.__maxDateTime, this.__defaultDateMinMaxValue);
|
|
561
|
-
newDatePicker.required = this.required;
|
|
562
|
-
newDatePicker.disabled = this.disabled;
|
|
563
|
-
newDatePicker.readonly = this.readonly;
|
|
564
|
-
newDatePicker.autoOpenDisabled = this.autoOpenDisabled;
|
|
565
542
|
|
|
566
543
|
// Disable default internal validation for the component
|
|
567
544
|
newDatePicker.validate = () => {};
|
|
@@ -581,7 +558,7 @@ class DateTimePicker extends FieldMixin(
|
|
|
581
558
|
|
|
582
559
|
this.__addInputListeners(newTimePicker);
|
|
583
560
|
|
|
584
|
-
if (newTimePicker
|
|
561
|
+
if (this.__isDefaultPicker(newTimePicker, 'time')) {
|
|
585
562
|
// Synchronize properties to default time picker
|
|
586
563
|
newTimePicker.placeholder = this.timePlaceholder;
|
|
587
564
|
newTimePicker.step = this.step;
|
|
@@ -597,10 +574,6 @@ class DateTimePicker extends FieldMixin(
|
|
|
597
574
|
// Min and max are always synchronized from parent to slotted because time picker min and max
|
|
598
575
|
// need to be dynamically set depending on currently selected date instead of simple propagation
|
|
599
576
|
this.__updateTimePickerMinMax();
|
|
600
|
-
newTimePicker.required = this.required;
|
|
601
|
-
newTimePicker.disabled = this.disabled;
|
|
602
|
-
newTimePicker.readonly = this.readonly;
|
|
603
|
-
newTimePicker.autoOpenDisabled = this.autoOpenDisabled;
|
|
604
577
|
|
|
605
578
|
// Disable default internal validation for the component
|
|
606
579
|
newTimePicker.validate = () => {};
|
|
@@ -634,88 +607,88 @@ class DateTimePicker extends FieldMixin(
|
|
|
634
607
|
}
|
|
635
608
|
|
|
636
609
|
/** @private */
|
|
637
|
-
__i18nChanged(
|
|
638
|
-
if (
|
|
639
|
-
|
|
610
|
+
__i18nChanged(i18n, datePicker, timePicker) {
|
|
611
|
+
if (datePicker) {
|
|
612
|
+
datePicker.i18n = { ...datePicker.i18n, ...i18n };
|
|
640
613
|
}
|
|
641
614
|
|
|
642
|
-
if (
|
|
643
|
-
|
|
615
|
+
if (timePicker) {
|
|
616
|
+
timePicker.i18n = { ...timePicker.i18n, ...i18n };
|
|
644
617
|
}
|
|
645
618
|
}
|
|
646
619
|
|
|
647
620
|
/** @private */
|
|
648
|
-
__datePlaceholderChanged(datePlaceholder) {
|
|
649
|
-
if (
|
|
650
|
-
|
|
621
|
+
__datePlaceholderChanged(datePlaceholder, datePicker) {
|
|
622
|
+
if (datePicker) {
|
|
623
|
+
datePicker.placeholder = datePlaceholder;
|
|
651
624
|
}
|
|
652
625
|
}
|
|
653
626
|
|
|
654
627
|
/** @private */
|
|
655
|
-
__timePlaceholderChanged(timePlaceholder) {
|
|
656
|
-
if (
|
|
657
|
-
|
|
628
|
+
__timePlaceholderChanged(timePlaceholder, timePicker) {
|
|
629
|
+
if (timePicker) {
|
|
630
|
+
timePicker.placeholder = timePlaceholder;
|
|
658
631
|
}
|
|
659
632
|
}
|
|
660
633
|
|
|
661
634
|
/** @private */
|
|
662
|
-
__stepChanged(step) {
|
|
663
|
-
if (
|
|
664
|
-
|
|
635
|
+
__stepChanged(step, timePicker) {
|
|
636
|
+
if (timePicker && timePicker.step !== step) {
|
|
637
|
+
timePicker.step = step;
|
|
665
638
|
}
|
|
666
639
|
}
|
|
667
640
|
|
|
668
641
|
/** @private */
|
|
669
|
-
__initialPositionChanged(initialPosition) {
|
|
670
|
-
if (
|
|
671
|
-
|
|
642
|
+
__initialPositionChanged(initialPosition, datePicker) {
|
|
643
|
+
if (datePicker) {
|
|
644
|
+
datePicker.initialPosition = initialPosition;
|
|
672
645
|
}
|
|
673
646
|
}
|
|
674
647
|
|
|
675
648
|
/** @private */
|
|
676
|
-
__showWeekNumbersChanged(showWeekNumbers) {
|
|
677
|
-
if (
|
|
678
|
-
|
|
649
|
+
__showWeekNumbersChanged(showWeekNumbers, datePicker) {
|
|
650
|
+
if (datePicker) {
|
|
651
|
+
datePicker.showWeekNumbers = showWeekNumbers;
|
|
679
652
|
}
|
|
680
653
|
}
|
|
681
654
|
|
|
682
655
|
/** @private */
|
|
683
|
-
__invalidChanged(invalid) {
|
|
684
|
-
if (
|
|
685
|
-
|
|
656
|
+
__invalidChanged(invalid, datePicker, timePicker) {
|
|
657
|
+
if (datePicker) {
|
|
658
|
+
datePicker.invalid = invalid;
|
|
686
659
|
}
|
|
687
|
-
if (
|
|
688
|
-
|
|
660
|
+
if (timePicker) {
|
|
661
|
+
timePicker.invalid = invalid;
|
|
689
662
|
}
|
|
690
663
|
}
|
|
691
664
|
|
|
692
665
|
/** @private */
|
|
693
|
-
__requiredChanged(required) {
|
|
694
|
-
if (
|
|
695
|
-
|
|
666
|
+
__requiredChanged(required, datePicker, timePicker) {
|
|
667
|
+
if (datePicker) {
|
|
668
|
+
datePicker.required = required;
|
|
696
669
|
}
|
|
697
|
-
if (
|
|
698
|
-
|
|
670
|
+
if (timePicker) {
|
|
671
|
+
timePicker.required = required;
|
|
699
672
|
}
|
|
700
673
|
}
|
|
701
674
|
|
|
702
675
|
/** @private */
|
|
703
|
-
__disabledChanged(disabled) {
|
|
704
|
-
if (
|
|
705
|
-
|
|
676
|
+
__disabledChanged(disabled, datePicker, timePicker) {
|
|
677
|
+
if (datePicker) {
|
|
678
|
+
datePicker.disabled = disabled;
|
|
706
679
|
}
|
|
707
|
-
if (
|
|
708
|
-
|
|
680
|
+
if (timePicker) {
|
|
681
|
+
timePicker.disabled = disabled;
|
|
709
682
|
}
|
|
710
683
|
}
|
|
711
684
|
|
|
712
685
|
/** @private */
|
|
713
|
-
__readonlyChanged(readonly) {
|
|
714
|
-
if (
|
|
715
|
-
|
|
686
|
+
__readonlyChanged(readonly, datePicker, timePicker) {
|
|
687
|
+
if (datePicker) {
|
|
688
|
+
datePicker.readonly = readonly;
|
|
716
689
|
}
|
|
717
|
-
if (
|
|
718
|
-
|
|
690
|
+
if (timePicker) {
|
|
691
|
+
timePicker.readonly = readonly;
|
|
719
692
|
}
|
|
720
693
|
}
|
|
721
694
|
|
|
@@ -1021,12 +994,12 @@ class DateTimePicker extends FieldMixin(
|
|
|
1021
994
|
}
|
|
1022
995
|
|
|
1023
996
|
/** @private */
|
|
1024
|
-
__autoOpenDisabledChanged(autoOpenDisabled) {
|
|
1025
|
-
if (
|
|
1026
|
-
|
|
997
|
+
__autoOpenDisabledChanged(autoOpenDisabled, datePicker, timePicker) {
|
|
998
|
+
if (datePicker) {
|
|
999
|
+
datePicker.autoOpenDisabled = autoOpenDisabled;
|
|
1027
1000
|
}
|
|
1028
|
-
if (
|
|
1029
|
-
|
|
1001
|
+
if (timePicker) {
|
|
1002
|
+
timePicker.autoOpenDisabled = autoOpenDisabled;
|
|
1030
1003
|
}
|
|
1031
1004
|
}
|
|
1032
1005
|
|
|
@@ -1053,7 +1026,7 @@ class DateTimePicker extends FieldMixin(
|
|
|
1053
1026
|
return;
|
|
1054
1027
|
}
|
|
1055
1028
|
|
|
1056
|
-
if (datePicker
|
|
1029
|
+
if (this.__isDefaultPicker(datePicker, 'date') !== this.__isDefaultPicker(timePicker, 'time')) {
|
|
1057
1030
|
// Both pickers are not replaced yet
|
|
1058
1031
|
return;
|
|
1059
1032
|
}
|
|
@@ -1064,6 +1037,10 @@ class DateTimePicker extends FieldMixin(
|
|
|
1064
1037
|
} else if (this.value) {
|
|
1065
1038
|
// The component has a value, update the new pickers values
|
|
1066
1039
|
this.__selectedDateTimeChanged(this.__selectedDateTime);
|
|
1040
|
+
|
|
1041
|
+
if (this.min || this.max) {
|
|
1042
|
+
this.validate();
|
|
1043
|
+
}
|
|
1067
1044
|
}
|
|
1068
1045
|
}
|
|
1069
1046
|
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/date-time-picker",
|
|
4
|
-
"version": "24.0.0-
|
|
4
|
+
"version": "24.0.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-date-time-picker",
|
|
11
|
-
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nIn addition to `<vaadin-date-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-time-picker-date-picker>` - has the same API as [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
11
|
+
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nIn addition to `<vaadin-date-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-time-picker-date-picker>` - has the same API as [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-date-picker).\n- `<vaadin-date-time-picker-time-picker>` - has the same API as [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
},
|
|
407
407
|
{
|
|
408
408
|
"name": "i18n",
|
|
409
|
-
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
409
|
+
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-time-picker).",
|
|
410
410
|
"value": {
|
|
411
411
|
"type": [
|
|
412
412
|
"DateTimePickerI18n"
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/date-time-picker",
|
|
4
|
-
"version": "24.0.0-
|
|
4
|
+
"version": "24.0.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-date-time-picker",
|
|
19
|
-
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nIn addition to `<vaadin-date-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-time-picker-date-picker>` - has the same API as [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
19
|
+
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nIn addition to `<vaadin-date-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-time-picker-date-picker>` - has the same API as [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-date-picker).\n- `<vaadin-date-time-picker-time-picker>` - has the same API as [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
"name": ".i18n",
|
|
150
|
-
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
150
|
+
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-time-picker).",
|
|
151
151
|
"value": {
|
|
152
152
|
"kind": "expression"
|
|
153
153
|
}
|