Skip to content

Commit 2b5a74a

Browse files
author
pipeline
committed
v17.1.49 is released
1 parent be01d3d commit 2b5a74a

File tree

365 files changed

+6512
-2741
lines changed

Some content is hidden

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

365 files changed

+6512
-2741
lines changed

controls/base/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 17.1.49 (2019-05-29)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- Fixed `parseDate` method returns invalid value when parsing `mm/yyyy` date format.
12+
513
## 17.1.48 (2019-05-21)
614

715
### Common
@@ -35,6 +43,10 @@
3543

3644
### Common
3745

46+
#### Bug Fixes
47+
48+
- #I234200 - Fixed `GetConstant` method does not return correct value when passing 0 as a value in localization.
49+
3850
#### New Features
3951

4052
- Provided support for evaluate script from Ajax request in Dom Library.

controls/base/dist/ej2-base.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/base/dist/ej2-base.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/base/dist/es6/ej2-base.es2015.js

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/base/dist/es6/ej2-base.es2015.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/base/dist/es6/ej2-base.es5.js

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controls/base/dist/es6/ej2-base.es5.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/base/dist/global/ej2-base.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/base/dist/global/ej2-base.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/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": "17.1.47",
3+
"version": "17.1.48",
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/spec/intl/date-parser.spec.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,19 @@ describe('DateParser', () => {
246246
expect(dateMatched(parseDate, result)).toBeTruthy();
247247
});
248248
it('custom date format "MMMM y GG"', () => {
249-
let result: Date = getParsedDate(cul, { format: 'MMMM y GG' }, parseDate);
249+
let date: any = parseDate;
250+
date.setDate(1);
251+
let result: Date = getParsedDate(cul, { format: 'MMMM y GG' }, date);
250252
expect(dateMatched(parseDate, result)).toBeTruthy();
251253
});
252254
it('custom date format "d/M/y"', () => {
253255
let result: Date = getParsedDate(cul, { format: 'd/M/y' }, parseDate);
254256
expect(dateMatched(parseDate, result)).toBeTruthy();
255257
});
256258
it('custom date format "MMM-y"', () => {
257-
let result: Date = getParsedDate(cul, { format: 'MMM-y' }, parseDate);
259+
let date: any = parseDate;
260+
date.setDate(1);
261+
let result: Date = getParsedDate(cul, { format: 'MMM-y' }, date);
258262
expect(dateMatched(parseDate, result)).toBeTruthy();
259263
});
260264
it('custom date format "dd-MMMM"', () => {
@@ -294,7 +298,9 @@ describe('DateParser', () => {
294298
expect(dateMatched(parseDate, result)).toBeTruthy();
295299
});
296300
it('custom date format "MMMM,y"', () => {
297-
let result: Date = getParsedDate(cul, { format: 'MMMM,y' }, parseDate);
301+
let date: any = parseDate;
302+
date.setDate(1)
303+
let result: Date = getParsedDate(cul, { format: 'MMMM,y' }, date);
298304
expect(dateMatched(parseDate, result)).toBeTruthy();
299305
});
300306
it('custom date format "MMMM d"', () => {
@@ -597,6 +603,7 @@ describe('DateParser', () => {
597603
getTimezoneOffset: () => { return -330 },
598604
setMinutes: (val: number) => { tvalue = val },
599605
setMilliseconds:() =>{},
606+
setDate:() => {},
600607
getMinutes: () => { return 20 }
601608
}
602609
it('getZoneValue for positive value', () => {

controls/base/src/intl/date-parser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ export class DateParser {
230230
}
231231
for (let key of tKeys) {
232232
let tValue: number = (<any>options)[key];
233+
if (isUndefined(tValue) && key === "day"){
234+
res.setDate(1);
235+
}
233236
if (!isUndefined(tValue)) {
234237
if (key === 'month') {
235238
tValue -= 1;

controls/base/src/l10n.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { extend } from './util';
1+
import { extend, isNullOrUndefined } from './util';
22
import { defaultCulture } from './internationalization';
33
/**
44
* L10n modules provides localized text for different culture.
@@ -61,8 +61,12 @@ export class L10n {
6161
* @return string
6262
*/
6363
public getConstant(prop: string): string {
64-
/* tslint:disable no-any */
65-
return (<any>this.currentLocale)[prop] || (<any>this.localeStrings)[prop] || '';
64+
// Removed conditional operator because this method does not return correct value when passing 0 as value in localization
65+
if (!isNullOrUndefined(this.currentLocale[prop])) {
66+
return this.currentLocale[prop];
67+
} else {
68+
return this.localeStrings[prop] || '';
69+
}
6670
}
6771

6872
/**
@@ -73,8 +77,8 @@ export class L10n {
7377
*/
7478

7579
private intGetControlConstant(curObject: Object, locale: string): Object {
76-
if ((<any>curObject)[locale]) {
77-
return (<any>curObject)[locale][this.controlName];
80+
if ((curObject)[locale]) {
81+
return (curObject)[locale][this.controlName];
7882
}
7983
return null;
8084
}

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+
## 17.1.49 (2019-05-29)
6+
7+
### DatePicker
8+
9+
#### Bug Fixes
10+
11+
- #235561 - Now, you can specify the date format without `year` specifier along with strict mode.
12+
513
## 17.1.48 (2019-05-21)
614

715
### Calendar

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: 24 additions & 15 deletions
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.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.

0 commit comments

Comments
 (0)