Skip to content

Commit 35e6fa8

Browse files
author
pipeline
committed
v17.3.26 is released
1 parent e951d55 commit 35e6fa8

File tree

385 files changed

+36050
-28080
lines changed

Some content is hidden

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

385 files changed

+36050
-28080
lines changed

controls/barcodegenerator/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-barcode-generator",
3-
"version": "17.3.9",
3+
"version": "17.3.19",
44
"description": "Barcode generator component is a pure JavaScript library which will convert a string to Barcode and show it to the user. This supports major 1D and 2D barcodes including coda bar, code 128, QR Code.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/buttons/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-buttons",
3-
"version": "17.3.16",
3+
"version": "17.3.19",
44
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/buttons/styles/chips/_material-definition.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ $chip-outline-avatar-choice-active-bg-color: darken($chip-outline-choice-active-
129129
$chip-outline-avatar-focus-active-bg-color: darken($chip-outline-focus-active-bg-color, 12%) !default;
130130
$chip-outline-avatar-choice-focus-active-bg-color: darken($chip-outline-choice-focus-active-bg-color, 12%) !default;
131131
$chip-outline-avatar-pressed-bg-color: darken($chip-outline-pressed-bg-color, 12%) !default;
132-
$chip-outline-avatar-pressed-active-bg-color: darken($chip-outline-pressed-active-bg-color, 12%);
132+
$chip-outline-avatar-pressed-active-bg-color: darken($chip-outline-pressed-active-bg-color, 12%) !default;
133133
$chip-outline-avatar-disabled-bg-color: darken($chip-outline-disabled-bg-color, 12%) !default;
134134
$chip-outline-font-color: rgba($grey-light-font, .87) !default;
135135
$chip-outline-hover-font-color: rgba($grey-light-font, .87) !default;

controls/calendars/CHANGELOG.md

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

33
## [Unreleased]
44

5-
## 17.3.21 (2019-10-30)
5+
## 17.3.26 (2019-11-05)
6+
7+
### DateTimePicker
8+
9+
#### New Features
10+
11+
- `#249683` - Now, you can set the server time zone for initial date value process using `serverTimezoneOffset` property.
12+
13+
### Calendar
14+
15+
#### New Features
16+
17+
- `#246049` - Now, month name, day name are capitalized for all localization.
18+
19+
## 17.3.19 (2019-10-22)
620

721
### TimePicker
822

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: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ let CalendarBase = class CalendarBase extends Component {
261261
}
262262
return culShortNames;
263263
}
264+
toCapitalize(text) {
265+
return !isNullOrUndefined(text) && text.length ? text[0].toUpperCase() + text.slice(1) : text;
266+
}
264267
createContentHeader() {
265268
if (this.getModuleName() === 'calendar') {
266269
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
@@ -290,7 +293,7 @@ let CalendarBase = class CalendarBase extends Component {
290293
}
291294
shortNames = this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek);
292295
for (let days = 0; days <= daysCount; days++) {
293-
html += '<th class="">' + shortNames[days] + '</th>';
296+
html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
294297
}
295298
html = '<tr>' + html + '</tr>';
296299
this.tableHeadElement.innerHTML = html;
@@ -753,7 +756,7 @@ let CalendarBase = class CalendarBase extends Component {
753756
let dayLink = this.createElement('span');
754757
let localMonth = (value && (value).getMonth() === localDate.getMonth());
755758
let select$$1 = (value && (value).getFullYear() === yr && localMonth);
756-
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'MMM' });
759+
dayLink.textContent = this.toCapitalize(this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'MMM' }));
757760
if ((this.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
758761
addClass([tdEle], DISABLED);
759762
}
@@ -1215,7 +1218,7 @@ let CalendarBase = class CalendarBase extends Component {
12151218
}
12161219
switch (view) {
12171220
case 'days':
1218-
this.headerTitleElement.textContent = dayFormatOptions;
1221+
this.headerTitleElement.textContent = this.toCapitalize(dayFormatOptions);
12191222
break;
12201223
case 'months':
12211224
this.headerTitleElement.textContent = monthFormatOptions;
@@ -1806,6 +1809,9 @@ __decorate([
18061809
__decorate([
18071810
Property(null)
18081811
], CalendarBase.prototype, "keyConfigs", void 0);
1812+
__decorate([
1813+
Property(null)
1814+
], CalendarBase.prototype, "serverTimezoneOffset", void 0);
18091815
__decorate([
18101816
Event()
18111817
], CalendarBase.prototype, "created", void 0);
@@ -1885,9 +1891,24 @@ let Calendar = class Calendar extends CalendarBase {
18851891
if (form) {
18861892
EventHandler.add(form, 'reset', this.formResetHandler.bind(this));
18871893
}
1894+
this.setTimeZone(this.serverTimezoneOffset);
18881895
}
18891896
this.renderComplete();
18901897
}
1898+
isDayLightSaving() {
1899+
let secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();
1900+
let firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();
1901+
return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));
1902+
}
1903+
setTimeZone(offsetValue) {
1904+
if (this.serverTimezoneOffset && this.value) {
1905+
let serverTimezoneDiff = offsetValue;
1906+
let clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;
1907+
let timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;
1908+
timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;
1909+
this.value = new Date(this.value.getTime() + (timeZoneDiff * 60 * 60 * 1000));
1910+
}
1911+
}
18911912
formResetHandler() {
18921913
this.setProperties({ value: null }, true);
18931914
}
@@ -2849,6 +2870,22 @@ let DatePicker = class DatePicker extends Calendar {
28492870
this.initialize();
28502871
this.bindEvents();
28512872
this.renderComplete();
2873+
this.setTimeZone(this.serverTimezoneOffset);
2874+
}
2875+
setTimeZone(offsetValue) {
2876+
if (this.serverTimezoneOffset && this.value) {
2877+
let clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;
2878+
let serverTimezoneDiff = offsetValue;
2879+
let timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;
2880+
timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;
2881+
this.value = new Date((this.value).getTime() + (timeZoneDiff * 60 * 60 * 1000));
2882+
this.updateInput();
2883+
}
2884+
}
2885+
isDayLightSaving() {
2886+
let firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();
2887+
let secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();
2888+
return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));
28522889
}
28532890
setAllowEdit() {
28542891
if (this.allowEdit) {
@@ -4339,6 +4376,9 @@ __decorate$1([
43394376
__decorate$1([
43404377
Property('Never')
43414378
], DatePicker.prototype, "floatLabelType", void 0);
4379+
__decorate$1([
4380+
Property(null)
4381+
], DatePicker.prototype, "serverTimezoneOffset", void 0);
43424382
__decorate$1([
43434383
Event()
43444384
], DatePicker.prototype, "open", void 0);
@@ -12124,6 +12164,9 @@ __decorate$4([
1212412164
__decorate$4([
1212512165
Property(false)
1212612166
], DateTimePicker.prototype, "strictMode", void 0);
12167+
__decorate$4([
12168+
Property(null)
12169+
], DateTimePicker.prototype, "serverTimezoneOffset", void 0);
1212712170
__decorate$4([
1212812171
Event()
1212912172
], DateTimePicker.prototype, "open", void 0);

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.

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

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
277277
}
278278
return culShortNames;
279279
};
280+
CalendarBase.prototype.toCapitalize = function (text) {
281+
return !isNullOrUndefined(text) && text.length ? text[0].toUpperCase() + text.slice(1) : text;
282+
};
280283
CalendarBase.prototype.createContentHeader = function () {
281284
if (this.getModuleName() === 'calendar') {
282285
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
@@ -306,7 +309,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
306309
}
307310
shortNames = this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek);
308311
for (var days = 0; days <= daysCount; days++) {
309-
html += '<th class="">' + shortNames[days] + '</th>';
312+
html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
310313
}
311314
html = '<tr>' + html + '</tr>';
312315
this.tableHeadElement.innerHTML = html;
@@ -770,7 +773,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
770773
var dayLink = this.createElement('span');
771774
var localMonth = (value && (value).getMonth() === localDate.getMonth());
772775
var select$$1 = (value && (value).getFullYear() === yr && localMonth);
773-
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'MMM' });
776+
dayLink.textContent = this.toCapitalize(this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'MMM' }));
774777
if ((this.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
775778
addClass([tdEle], DISABLED);
776779
}
@@ -1233,7 +1236,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
12331236
}
12341237
switch (view) {
12351238
case 'days':
1236-
this.headerTitleElement.textContent = dayFormatOptions;
1239+
this.headerTitleElement.textContent = this.toCapitalize(dayFormatOptions);
12371240
break;
12381241
case 'months':
12391242
this.headerTitleElement.textContent = monthFormatOptions;
@@ -1823,6 +1826,9 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
18231826
__decorate([
18241827
Property(null)
18251828
], CalendarBase.prototype, "keyConfigs", void 0);
1829+
__decorate([
1830+
Property(null)
1831+
], CalendarBase.prototype, "serverTimezoneOffset", void 0);
18261832
__decorate([
18271833
Event()
18281834
], CalendarBase.prototype, "created", void 0);
@@ -1905,9 +1911,24 @@ var Calendar = /** @__PURE__ @class */ (function (_super) {
19051911
if (form) {
19061912
EventHandler.add(form, 'reset', this.formResetHandler.bind(this));
19071913
}
1914+
this.setTimeZone(this.serverTimezoneOffset);
19081915
}
19091916
this.renderComplete();
19101917
};
1918+
Calendar.prototype.isDayLightSaving = function () {
1919+
var secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();
1920+
var firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();
1921+
return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));
1922+
};
1923+
Calendar.prototype.setTimeZone = function (offsetValue) {
1924+
if (this.serverTimezoneOffset && this.value) {
1925+
var serverTimezoneDiff = offsetValue;
1926+
var clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;
1927+
var timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;
1928+
timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;
1929+
this.value = new Date(this.value.getTime() + (timeZoneDiff * 60 * 60 * 1000));
1930+
}
1931+
};
19111932
Calendar.prototype.formResetHandler = function () {
19121933
this.setProperties({ value: null }, true);
19131934
};
@@ -2888,6 +2909,22 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
28882909
this.initialize();
28892910
this.bindEvents();
28902911
this.renderComplete();
2912+
this.setTimeZone(this.serverTimezoneOffset);
2913+
};
2914+
DatePicker.prototype.setTimeZone = function (offsetValue) {
2915+
if (this.serverTimezoneOffset && this.value) {
2916+
var clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;
2917+
var serverTimezoneDiff = offsetValue;
2918+
var timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;
2919+
timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;
2920+
this.value = new Date((this.value).getTime() + (timeZoneDiff * 60 * 60 * 1000));
2921+
this.updateInput();
2922+
}
2923+
};
2924+
DatePicker.prototype.isDayLightSaving = function () {
2925+
var firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();
2926+
var secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();
2927+
return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));
28912928
};
28922929
DatePicker.prototype.setAllowEdit = function () {
28932930
if (this.allowEdit) {
@@ -4384,6 +4421,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
43844421
__decorate$1([
43854422
Property('Never')
43864423
], DatePicker.prototype, "floatLabelType", void 0);
4424+
__decorate$1([
4425+
Property(null)
4426+
], DatePicker.prototype, "serverTimezoneOffset", void 0);
43874427
__decorate$1([
43884428
Event()
43894429
], DatePicker.prototype, "open", void 0);
@@ -12258,6 +12298,9 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
1225812298
__decorate$4([
1225912299
Property(false)
1226012300
], DateTimePicker.prototype, "strictMode", void 0);
12301+
__decorate$4([
12302+
Property(null)
12303+
], DateTimePicker.prototype, "serverTimezoneOffset", void 0);
1226112304
__decorate$4([
1226212305
Event()
1226312306
], DateTimePicker.prototype, "open", void 0);

controls/calendars/dist/es6/ej2-calendars.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.

0 commit comments

Comments
 (0)