@syncfusion/ej2-calendars 23.2.4 → 23.2.7
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/CHANGELOG.md +8 -0
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +40 -11
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +40 -11
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/calendar/calendar.js +7 -1
- package/src/datepicker/datepicker.js +4 -2
- package/src/daterangepicker/daterangepicker.js +8 -4
- package/src/datetimepicker/datetimepicker.js +4 -2
- package/src/maskbase/masked-date-time.d.ts +1 -0
- package/src/maskbase/masked-date-time.js +14 -1
- package/src/timepicker/timepicker.js +3 -1
|
@@ -1297,8 +1297,14 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1297
1297
|
this.createContentHeader();
|
|
1298
1298
|
this.createContentBody();
|
|
1299
1299
|
}
|
|
1300
|
+
if (this.getModuleName() === 'calendar') {
|
|
1301
|
+
var l10nLocale = { today: 'Today' };
|
|
1302
|
+
this.l10 = new L10n(this.getModuleName(), l10nLocale, this.locale);
|
|
1303
|
+
}
|
|
1300
1304
|
this.l10.setLocale(this.locale);
|
|
1301
|
-
this.
|
|
1305
|
+
if (this.showTodayButton) {
|
|
1306
|
+
this.updateFooter();
|
|
1307
|
+
}
|
|
1302
1308
|
break;
|
|
1303
1309
|
case 'showTodayButton':
|
|
1304
1310
|
if (newProp.showTodayButton) {
|
|
@@ -5083,8 +5089,10 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5083
5089
|
case 'locale':
|
|
5084
5090
|
this.globalize = new Internationalization(this.locale);
|
|
5085
5091
|
this.l10n.setLocale(this.locale);
|
|
5086
|
-
this.
|
|
5087
|
-
|
|
5092
|
+
if (this.datepickerOptions && this.datepickerOptions.placeholder == null) {
|
|
5093
|
+
this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
|
|
5094
|
+
Input.setPlaceholder(this.placeholder, this.inputElement);
|
|
5095
|
+
}
|
|
5088
5096
|
this.updateInput();
|
|
5089
5097
|
if (this.enableMask) {
|
|
5090
5098
|
this.notify('createMask', {
|
|
@@ -9419,8 +9427,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9419
9427
|
DateRangePicker.prototype.setLocale = function () {
|
|
9420
9428
|
this.globalize = new Internationalization(this.locale);
|
|
9421
9429
|
this.l10n.setLocale(this.locale);
|
|
9422
|
-
this.
|
|
9423
|
-
|
|
9430
|
+
if (this.dateRangeOptions && this.dateRangeOptions.placeholder == null) {
|
|
9431
|
+
this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
|
|
9432
|
+
Input.setPlaceholder(this.placeholder, this.inputElement);
|
|
9433
|
+
}
|
|
9424
9434
|
this.updateInput();
|
|
9425
9435
|
this.updateHiddenInput();
|
|
9426
9436
|
this.changeTrigger();
|
|
@@ -9577,8 +9587,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9577
9587
|
case 'locale':
|
|
9578
9588
|
this.globalize = new Internationalization(this.locale);
|
|
9579
9589
|
this.l10n.setLocale(this.locale);
|
|
9580
|
-
this.
|
|
9581
|
-
|
|
9590
|
+
if (this.dateRangeOptions && this.dateRangeOptions.placeholder == null) {
|
|
9591
|
+
this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
|
|
9592
|
+
Input.setPlaceholder(this.placeholder, this.inputElement);
|
|
9593
|
+
}
|
|
9582
9594
|
this.setLocale();
|
|
9583
9595
|
break;
|
|
9584
9596
|
case 'htmlAttributes':
|
|
@@ -12234,7 +12246,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12234
12246
|
this.setProperties({ locale: newProp.locale }, true);
|
|
12235
12247
|
this.globalize = new Internationalization(this.locale);
|
|
12236
12248
|
this.l10n.setLocale(this.locale);
|
|
12237
|
-
this.
|
|
12249
|
+
if (this.timeOptions && this.timeOptions.placeholder == null) {
|
|
12250
|
+
this.updatePlaceHolder();
|
|
12251
|
+
}
|
|
12238
12252
|
this.setValue(this.value);
|
|
12239
12253
|
if (this.enableMask) {
|
|
12240
12254
|
this.notify('createMask', {
|
|
@@ -13896,8 +13910,10 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13896
13910
|
case 'locale':
|
|
13897
13911
|
this.globalize = new Internationalization(this.locale);
|
|
13898
13912
|
this.l10n.setLocale(this.locale);
|
|
13899
|
-
this.
|
|
13900
|
-
|
|
13913
|
+
if (this.dateTimeOptions && this.dateTimeOptions.placeholder == null) {
|
|
13914
|
+
this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
|
|
13915
|
+
Input.setPlaceholder(this.l10n.getConstant('placeholder'), this.inputElement);
|
|
13916
|
+
}
|
|
13901
13917
|
this.dateTimeFormat = this.cldrDateTimeFormat();
|
|
13902
13918
|
_super.prototype.updateInput.call(this);
|
|
13903
13919
|
break;
|
|
@@ -14161,6 +14177,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
14161
14177
|
this.isDateZero = false;
|
|
14162
14178
|
this.isMonthZero = false;
|
|
14163
14179
|
this.isYearZero = false;
|
|
14180
|
+
this.isLeadingZero = false;
|
|
14164
14181
|
this.dayTypeCount = 0;
|
|
14165
14182
|
this.monthTypeCount = 0;
|
|
14166
14183
|
this.hourTypeCount = 0;
|
|
@@ -14404,7 +14421,18 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
14404
14421
|
}
|
|
14405
14422
|
if (month >= 1) {
|
|
14406
14423
|
newDateValue.setMonth(month - 1);
|
|
14407
|
-
|
|
14424
|
+
if (month >= 10 || month == 1) {
|
|
14425
|
+
if (this.isLeadingZero && month == 1) {
|
|
14426
|
+
this.isNavigate = month.toString().length === 1;
|
|
14427
|
+
this.isLeadingZero = false;
|
|
14428
|
+
}
|
|
14429
|
+
else {
|
|
14430
|
+
this.isNavigate = month.toString().length === 2;
|
|
14431
|
+
}
|
|
14432
|
+
}
|
|
14433
|
+
else {
|
|
14434
|
+
this.isNavigate = month.toString().length === 1;
|
|
14435
|
+
}
|
|
14408
14436
|
if (newDateValue.getMonth() !== month - 1) {
|
|
14409
14437
|
newDateValue.setDate(1);
|
|
14410
14438
|
newDateValue.setMonth(month - 1);
|
|
@@ -14422,6 +14450,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
14422
14450
|
}
|
|
14423
14451
|
else {
|
|
14424
14452
|
newDateValue.setMonth(0);
|
|
14453
|
+
this.isLeadingZero = true;
|
|
14425
14454
|
this.isMonthPart = false;
|
|
14426
14455
|
this.monthTypeCount = this.isMonthZero ? this.monthTypeCount + 1 : this.monthTypeCount;
|
|
14427
14456
|
}
|