@vaadin/date-picker 23.1.0-rc3 → 23.1.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.
- package/package.json +10 -10
- package/src/vaadin-date-picker-mixin.js +13 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-picker",
|
|
3
|
-
"version": "23.1.0
|
|
3
|
+
"version": "23.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
36
|
"@polymer/polymer": "^3.2.0",
|
|
37
|
-
"@vaadin/button": "23.1.0
|
|
38
|
-
"@vaadin/component-base": "23.1.0
|
|
39
|
-
"@vaadin/field-base": "23.1.0
|
|
40
|
-
"@vaadin/input-container": "23.1.0
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0
|
|
42
|
-
"@vaadin/vaadin-material-styles": "23.1.0
|
|
43
|
-
"@vaadin/vaadin-overlay": "23.1.0
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0
|
|
37
|
+
"@vaadin/button": "^23.1.0",
|
|
38
|
+
"@vaadin/component-base": "^23.1.0",
|
|
39
|
+
"@vaadin/field-base": "^23.1.0",
|
|
40
|
+
"@vaadin/input-container": "^23.1.0",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "^23.1.0",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "^23.1.0",
|
|
43
|
+
"@vaadin/vaadin-overlay": "^23.1.0",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "^23.1.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
48
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
49
49
|
"sinon": "^13.0.2"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "322bba42b83f908a78cd972b06acadc5da95a69d"
|
|
52
52
|
}
|
|
@@ -935,7 +935,8 @@ export const DatePickerMixin = (subclass) =>
|
|
|
935
935
|
* to validate and dispatch change on clear.
|
|
936
936
|
* @protected
|
|
937
937
|
*/
|
|
938
|
-
_onClearButtonClick() {
|
|
938
|
+
_onClearButtonClick(event) {
|
|
939
|
+
event.preventDefault();
|
|
939
940
|
this.value = '';
|
|
940
941
|
this._inputValue = '';
|
|
941
942
|
this.validate();
|
|
@@ -1026,19 +1027,25 @@ export const DatePickerMixin = (subclass) =>
|
|
|
1026
1027
|
* Do not call `super` in order to override clear
|
|
1027
1028
|
* button logic defined in `InputControlMixin`.
|
|
1028
1029
|
*
|
|
1029
|
-
* @param {!KeyboardEvent}
|
|
1030
|
+
* @param {!KeyboardEvent} event
|
|
1030
1031
|
* @protected
|
|
1031
1032
|
* @override
|
|
1032
1033
|
*/
|
|
1033
|
-
_onEscape(
|
|
1034
|
+
_onEscape(event) {
|
|
1034
1035
|
// Closing overlay is handled in vaadin-overlay-escape-press event listener.
|
|
1035
1036
|
if (this.opened) {
|
|
1036
1037
|
return;
|
|
1037
1038
|
}
|
|
1038
1039
|
|
|
1039
|
-
if (this.clearButtonVisible) {
|
|
1040
|
-
|
|
1041
|
-
|
|
1040
|
+
if (this.clearButtonVisible && !!this.value) {
|
|
1041
|
+
// Stop event from propagating to the host element
|
|
1042
|
+
// to avoid closing dialog when clearing on Esc
|
|
1043
|
+
event.stopPropagation();
|
|
1044
|
+
this._onClearButtonClick(event);
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
if (this.autoOpenDisabled) {
|
|
1042
1049
|
// Do not restore selected date if Esc was pressed after clearing input field
|
|
1043
1050
|
if (this.inputElement.value === '') {
|
|
1044
1051
|
this._selectDate(null);
|