Skip to content

Commit e3253db

Browse files
author
pipeline
committed
v18.4.34 is released
1 parent a573cf0 commit e3253db

File tree

317 files changed

+7272
-2351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+7272
-2351
lines changed

controls/base/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 18.4.33 (2021-01-05)
5+
## 18.4.31 (2020-12-22)
66

77
### Common
88

controls/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-base",
3-
"version": "18.4.30",
3+
"version": "18.4.31",
44
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/buttons/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 18.4.33 (2021-01-05)
5+
## 18.4.34 (2021-01-12)
66

77
### CheckBox
88

controls/calendars/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 18.4.34 (2021-01-12)
6+
7+
### DateTimePicker
8+
9+
#### Bug Fixes
10+
11+
- `#309143` - Issue with "timepicker popup is not opened when render component with `openOnFocus` as true and click on the time icon" has been resolved.
12+
513
## 18.3.52 (2020-12-01)
614

715
### Calendar

controls/calendars/blazor/sf-datepicker.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { BlazorDotnetObject, Browser, Animation, closest, EventHandler, isNullOrUndefined, } from '@syncfusion/ej2-base';
2-
import { select, createElement, extend, KeyboardEvents, KeyboardEventArgs, removeClass, formatUnit } from '@syncfusion/ej2-base';
2+
import { select, createElement, extend, KeyboardEvents, KeyboardEventArgs, removeClass, remove, formatUnit } from '@syncfusion/ej2-base';
33
import { Popup } from '@syncfusion/ej2-popups';
44
const ROOT: string = 'e-datepicker';
55
const POPUPDIMENSION: string = '240px';
@@ -117,6 +117,10 @@ class SfDatePicker {
117117
public renderPopup(popupElement: HTMLElement, popupHolderEle: HTMLElement, openEventArgs: PopupObjectArgs, options: IDatePickerOptions): void {
118118
this.options = options;
119119
this.popupHolder = popupHolderEle;
120+
let oldPopupEle: HTMLElement = document.body.querySelector('.e-datepicker.e-popup-open');
121+
if (oldPopupEle) {
122+
remove(oldPopupEle);
123+
}
120124
this.createCalendar(popupElement, options);
121125
if (Browser.isDevice && options.isDatePopup) {
122126
this.mobilePopupContainer = createElement('div', { className: 'e-datepick-mob-popup-wrap' });

controls/calendars/blazor/sf-daterangepicker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ class SfDateRangePicker {
142142
public renderPopup(popupElement: HTMLElement, popupHolderEle: HTMLElement, openEventArgs: PopupObjectArgs, options: IDateRangePickerOptions): void {
143143
this.options = options;
144144
this.popupHolder = popupHolderEle;
145+
let oldPopupEle: HTMLElement = document.body.querySelector('.e-daterangepicker.e-popup-open');
146+
if (oldPopupEle) {
147+
remove(oldPopupEle);
148+
}
145149
this.createCalendar(popupElement, options);
146150
if (Browser.isDevice) {
147151
this.mobilePopupContainer = this.popupHolder.querySelector('.e-daterangepick-mob-popup-wrap');

controls/calendars/blazor/sf-timepicker.ts

Lines changed: 7 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ class SfTimePicker {
7474
this.timeCollections = [];
7575
this.listWrapper = popupHolderEle.querySelector('.' + POPUP_CONTENT) as HTMLElement || select('.' + POPUP_CONTENT) as HTMLElement;
7676
this.getTimeCollection();
77-
this.wireListEvents();
7877
if (!isNullOrUndefined((this.element as HTMLInputElement).value)) {
7978
this.removeSelection();
8079
this.selectedElement = this.listWrapper.querySelector(
@@ -115,17 +114,6 @@ class SfTimePicker {
115114
selectElement.setAttribute(ARIA_SELECT, 'true');
116115
}
117116
}
118-
public updateListStatus(index: number, status: string): void {
119-
if (!isNullOrUndefined(this.listWrapper) && !isNullOrUndefined(index)) {
120-
this.selectedElement = this.listWrapper.querySelectorAll('.' + LISTCLASS)[index] as HTMLElement;
121-
if (status === SELECT) {
122-
this.removeSelection();
123-
this.updateSelection(this.selectedElement);
124-
}
125-
this.setHover(this.selectedElement, NAVIGATION);
126-
this.setScrollPosition();
127-
}
128-
}
129117
private setScrollPosition(): void {
130118
if (!isNullOrUndefined(this.selectedElement)) {
131119
this.findScrollTop(this.selectedElement);
@@ -205,7 +193,6 @@ class SfTimePicker {
205193
open: () => {
206194
this.popupWrapper.style.visibility = 'visible';
207195
}, close: () => {
208-
this.unWireListEvents();
209196
this.popupHolder.appendChild(this.popupWrapper);
210197
if (this.popupObj) {
211198
this.popupObj.destroy();
@@ -226,38 +213,6 @@ class SfTimePicker {
226213
removeClass([document.body], OVERFLOW);
227214
this.closeEventCallback(closeEventArgs);
228215
}
229-
private wireListEvents(): void {
230-
EventHandler.add(this.listWrapper, 'click', this.onMouseClick, this);
231-
if (!Browser.isDevice) {
232-
EventHandler.add(this.listWrapper, 'mouseover', this.onMouseOver, this);
233-
EventHandler.add(this.listWrapper, 'mouseout', this.onMouseLeave, this);
234-
}
235-
}
236-
private onMouseClick(event: MouseEvent): void {
237-
let target: Element = <Element>event.target;
238-
let li: HTMLElement = this.selectedElement = <HTMLElement>closest(target, '.' + LISTCLASS);
239-
let dataVal: string = li.getAttribute('data-value');
240-
if (this.isValidLI(li) && !li.classList.contains(SELECTED)) {
241-
this.removeSelection();
242-
this.updateSelection(this.selectedElement);
243-
this.dotNetRef.invokeMethodAsync(LIST_CLICK, dataVal, event);
244-
} else {
245-
this.dotNetRef.invokeMethodAsync(HIDE_POPUP, event);
246-
}
247-
}
248-
private onMouseOver(event: MouseEvent): void {
249-
let currentLi: HTMLElement = <HTMLElement>closest(<Element>event.target, '.' + LISTCLASS);
250-
this.setHover(currentLi, HOVER);
251-
}
252-
private setHover(li: HTMLElement, className: string): void {
253-
if (this.isValidLI(li) && !li.classList.contains(className)) {
254-
this.removeHover(className);
255-
addClass([li], className);
256-
if (className === NAVIGATION) {
257-
li.setAttribute(ARIA_SELECT, 'true');
258-
}
259-
}
260-
}
261216
private removeSelection(): void {
262217
this.removeHover(HOVER);
263218
if (!isNullOrUndefined(this.popupWrapper)) {
@@ -278,21 +233,6 @@ class SfTimePicker {
278233
}
279234
}
280235
}
281-
private isValidLI(li: Element | HTMLElement): boolean {
282-
return (li && li.classList.contains(LISTCLASS) && !li.classList.contains(DISABLED));
283-
}
284-
private onMouseLeave(): void {
285-
this.removeHover(HOVER);
286-
}
287-
private unWireListEvents(): void {
288-
if (this.listWrapper) {
289-
EventHandler.remove(this.listWrapper, 'click', this.onMouseClick);
290-
if (!Browser.isDevice) {
291-
EventHandler.remove(this.listWrapper, 'mouseover', this.onMouseOver);
292-
EventHandler.remove(this.listWrapper, 'mouseout', this.onMouseLeave);
293-
}
294-
}
295-
}
296236
private setWidth(width: number | string): string {
297237
if (typeof width === 'number') {
298238
width = formatUnit(width);
@@ -359,9 +299,13 @@ class SfTimePicker {
359299
popupWrapper.style.zIndex = index.toString();
360300
}
361301
}
362-
public selectInputText(element: BlazorTimePickerElement | HTMLInputElement): void {
302+
public selectInputText(element: BlazorTimePickerElement | HTMLInputElement, isNavigation: boolean, index: number): void {
363303
if (!Browser.isDevice) {
364304
(element as HTMLInputElement).setSelectionRange(0, (element as HTMLInputElement).value.length);
305+
if (isNavigation && this.listWrapper) {
306+
this.selectedElement = this.listWrapper.querySelectorAll('.' + LISTCLASS)[index] as HTMLElement;
307+
this.setScrollPosition();
308+
}
365309
}
366310
}
367311
public isDevice(): Boolean {
@@ -406,14 +350,9 @@ let TimePicker: object = {
406350
element.blazor__instance.closePopup(closeEventArgs, options);
407351
}
408352
},
409-
selectInputText(element: BlazorTimePickerElement): void {
410-
if (element && element.blazor__instance) {
411-
element.blazor__instance.selectInputText(element);
412-
}
413-
},
414-
updateListStatus(element: BlazorTimePickerElement, index: number, status: string): void {
353+
selectInputText(element: BlazorTimePickerElement, isNavigation: boolean, index: number): void {
415354
if (element && element.blazor__instance) {
416-
element.blazor__instance.updateListStatus(index, status);
355+
element.blazor__instance.selectInputText(element, isNavigation, index);
417356
}
418357
},
419358
focusIn(inputEle: HTMLInputElement): void {

controls/calendars/dist/ej2-calendars.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/calendars/dist/ej2-calendars.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/calendars/dist/es6/ej2-calendars.es2015.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,6 +2957,7 @@ let DatePicker = class DatePicker extends Calendar {
29572957
this.checkPreviousValue = null;
29582958
this.isAngular = false;
29592959
this.preventChange = false;
2960+
this.isIconClicked = false;
29602961
this.datepickerOptions = options;
29612962
}
29622963
/**
@@ -3371,6 +3372,7 @@ let DatePicker = class DatePicker extends Calendar {
33713372
Input.setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);
33723373
}
33733374
dateIconHandler(e) {
3375+
this.isIconClicked = true;
33743376
if (Browser.isDevice) {
33753377
this.inputElement.setAttribute('readonly', '');
33763378
this.inputElement.blur();
@@ -3395,6 +3397,7 @@ let DatePicker = class DatePicker extends Calendar {
33953397
}
33963398
}
33973399
}
3400+
this.isIconClicked = false;
33983401
}
33993402
updateHtmlAttributeToWrapper() {
34003403
if (!isNullOrUndefined(this.htmlAttributes)) {
@@ -3485,7 +3488,7 @@ let DatePicker = class DatePicker extends Calendar {
34853488
this.isDateIconClicked = false;
34863489
this.trigger('focus', focusArguments);
34873490
this.updateIconState();
3488-
if (this.openOnFocus) {
3491+
if (this.openOnFocus && !this.isIconClicked) {
34893492
this.show();
34903493
}
34913494
}
@@ -11866,6 +11869,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
1186611869
}
1186711870
}
1186811871
timeHandler(e) {
11872+
this.isIconClicked = true;
1186911873
if (Browser.isDevice) {
1187011874
this.inputElement.setAttribute('readonly', '');
1187111875
}
@@ -11885,6 +11889,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
1188511889
addClass([this.inputWrapper.container], [INPUTFOCUS$2]);
1188611890
}
1188711891
}
11892+
this.isIconClicked = false;
1188811893
}
1188911894
dateHandler(e) {
1189011895
if (e.currentTarget === this.inputWrapper.buttons[0]) {
@@ -12039,9 +12044,6 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
1203912044
&& target === this.popupObject.element);
1204012045
}
1204112046
}
12042-
if (this.openOnFocus) {
12043-
this.show();
12044-
}
1204512047
}
1204612048
isTimePopupOpen() {
1204712049
return (this.dateTimeWrapper && this.dateTimeWrapper.classList.contains('' + ROOT$4)) ? true : false;

0 commit comments

Comments
 (0)