Skip to content

Commit 5529713

Browse files
author
pipeline
committed
v19.1.64 is released
1 parent 2807d50 commit 5529713

File tree

161 files changed

+2951
-1221
lines changed

Some content is hidden

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

161 files changed

+2951
-1221
lines changed

controls/barcodegenerator/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-
## 19.1.63 (2021-05-13)
5+
## 19.1.64 (2021-05-19)
66

77
### Barcode
88

controls/base/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+
## 19.1.64 (2021-05-19)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- `I323536` - Resolved Negative decimal value without zero parses into non-decimal values.
12+
513
## 19.1.57 (2021-04-20)
614

715
### Common

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": "19.1.57",
3+
"version": "19.1.63",
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/base/src/intl/number-parser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class NumberParser {
104104
} else {
105105
value = parser.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);
106106
value = parser.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);
107+
value = value.indexOf('-') !== -1 ? value.replace('-.','-0.') : value;
107108
if (value.indexOf('.') === 0) {
108109
value = '0' + value;
109110
}

controls/calendars/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-calendars",
3-
"version": "19.1.56",
3+
"version": "19.1.63",
44
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/calendars/spec/daterangepicker/daterangepicker.spec.ts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9384,6 +9384,81 @@ describe('DateRangePicker', () => {
93849384
expect(document.body.contains(dateRangePicker.popupObj)).toBe(false);
93859385
});
93869386
});
9387+
describe('EJ2-48804- Preset ranges with time value', function() {
9388+
let dateRangePicker:any;
9389+
beforeEach(function(){
9390+
let element: HTMLElement = createElement('input',{id:'date'});
9391+
document.body.appendChild(element);
9392+
9393+
});
9394+
afterEach(function(){
9395+
if(dateRangePicker){
9396+
dateRangePicker.destroy();
9397+
}
9398+
document.body.innerHTML = '';
9399+
});
9400+
it('Checking preset item is selected when popup is opened', function() {
9401+
dateRangePicker = new DateRangePicker({
9402+
presets: [
9403+
{ label: 'Custom Date', start: new Date(2020,1,1,10,10,50), end: new Date(2020,3,1,9,30,40) },
9404+
{ label: 'Last week', start: new Date(new Date().setDate(new Date().getDate() - 7)), end: new Date()}
9405+
],
9406+
});
9407+
dateRangePicker.appendTo('#date');
9408+
dateRangePicker.show();
9409+
<HTMLElement>(dateRangePicker.popupObj.element.querySelector('.e-presets li:first-child')).click();
9410+
let startDate: string = dateRangePicker.globalize.formatDate(dateRangePicker.startDate, { format: dateRangePicker.format, type: 'date', skeleton: 'yMd' });
9411+
let endDate: string = dateRangePicker.globalize.formatDate(dateRangePicker.endDate, { format: dateRangePicker.format, type: 'date', skeleton: 'yMd' });
9412+
expect(dateRangePicker.element.value === startDate + ' - ' + endDate).toBe(true);
9413+
dateRangePicker.hide();
9414+
dateRangePicker.focusOut();
9415+
dateRangePicker.show();
9416+
expect((dateRangePicker.popupObj.element.querySelector('.e-presets li:first-child')).classList.contains('e-active')).toBe(true);
9417+
})
9418+
it('Checking preset item is selected when popup is opened with predefined value', function() {
9419+
dateRangePicker = new DateRangePicker({
9420+
value: [new Date(2020,1,1,10,10,50), new Date(2020,3,1,9,30,40)],
9421+
presets: [
9422+
{ label: 'Custom Date', start: new Date(2020,1,1,10,10,50), end: new Date(2020,3,1,9,30,40) },
9423+
{ label: 'My Date', start: new Date('1/1/2020'), end: new Date('3/2/2020') },
9424+
{ label: 'Today', start: new Date(), end: new Date() },
9425+
{ label: 'Last week', start: new Date(new Date().setDate(new Date().getDate() - 7)), end: new Date()}
9426+
],
9427+
});
9428+
dateRangePicker.appendTo('#date');
9429+
let startDate: string = dateRangePicker.globalize.formatDate(dateRangePicker.startDate, { format: dateRangePicker.format, type: 'date', skeleton: 'yMd' });
9430+
let endDate: string = dateRangePicker.globalize.formatDate(dateRangePicker.endDate, { format: dateRangePicker.format, type: 'date', skeleton: 'yMd' });
9431+
expect(dateRangePicker.element.value === startDate + ' - ' + endDate).toBe(true);
9432+
dateRangePicker.show();
9433+
expect((dateRangePicker.popupObj.element.querySelector('.e-presets li:first-child')).classList.contains('e-active')).toBe(true);
9434+
dateRangePicker.hide();
9435+
dateRangePicker.focusOut();
9436+
dateRangePicker.show();
9437+
expect((dateRangePicker.popupObj.element.querySelector('.e-presets li:first-child')).classList.contains('e-active')).toBe(true);
9438+
})
9439+
it('Checking preset item is selected when popup is opened with predefined startdate and enddate', function() {
9440+
dateRangePicker = new DateRangePicker({
9441+
startDate: new Date(2020,1,1,10,10,50),
9442+
endDate: new Date(2020,3,1,9,30,40),
9443+
presets: [
9444+
{ label: 'Custom Date', start: new Date(2020,1,1,10,10,50), end: new Date(2020,3,1,9,30,40) },
9445+
{ label: 'My Date', start: new Date('1/1/2020'), end: new Date('3/2/2020') },
9446+
{ label: 'Today', start: new Date(), end: new Date() },
9447+
{ label: 'Last week', start: new Date(new Date().setDate(new Date().getDate() - 7)), end: new Date()}
9448+
],
9449+
});
9450+
dateRangePicker.appendTo('#date');
9451+
let startDate: string = dateRangePicker.globalize.formatDate(dateRangePicker.startDate, { format: dateRangePicker.format, type: 'date', skeleton: 'yMd' });
9452+
let endDate: string = dateRangePicker.globalize.formatDate(dateRangePicker.endDate, { format: dateRangePicker.format, type: 'date', skeleton: 'yMd' });
9453+
expect(dateRangePicker.element.value === startDate + ' - ' + endDate).toBe(true);
9454+
dateRangePicker.show();
9455+
expect((dateRangePicker.popupObj.element.querySelector('.e-presets li:first-child')).classList.contains('e-active')).toBe(true);
9456+
dateRangePicker.hide();
9457+
dateRangePicker.focusOut();
9458+
dateRangePicker.show();
9459+
expect((dateRangePicker.popupObj.element.querySelector('.e-presets li:first-child')).classList.contains('e-active')).toBe(true);
9460+
})
9461+
})
93879462
});
93889463
interface CalendarElement {
93899464
leftCalTitle: HTMLElement;

controls/calendars/src/daterangepicker/daterangepicker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,8 +1340,8 @@ export class DateRangePicker extends CalendarBase {
13401340
const startDate: Date = this.presetsItem[i].start as Date;
13411341
const endDate: Date = this.presetsItem[i].end as Date;
13421342
if (this.startValue && this.endValue) {
1343-
if ((+startDate.setMilliseconds(0) === +this.startValue.setMilliseconds(0)) &&
1344-
(+endDate.setMilliseconds(0) === +this.endValue.setMilliseconds(0))) {
1343+
if ((+new Date(startDate.setHours(0, 0, 0, 0)) === +new Date(this.startValue.setHours(0, 0, 0, 0))) &&
1344+
(+new Date(endDate.setHours(0, 0, 0, 0)) === +new Date(this.endValue.setHours(0, 0, 0, 0)))) {
13451345
this.activeIndex = i;
13461346
this.isCustomRange = false;
13471347
}

controls/charts/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-
## 19.1.63 (2021-05-13)
5+
## 19.1.64 (2021-05-19)
66

77
### Chart
88

controls/circulargauge/CHANGELOG.md

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

55
## [Unreleased]
66

7-
## 19.1.63 (2021-05-13)
7+
## 19.1.64 (2021-05-19)
88

99
### CircularGauge
1010

controls/compression/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-
## 19.1.63 (2021-05-13)
5+
## 19.1.64 (2021-05-19)
66

77
### Compression
88

0 commit comments

Comments
 (0)