@syncfusion/ej2-calendars 23.2.6 → 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.
@@ -5038,8 +5038,10 @@ let DatePicker = class DatePicker extends Calendar {
5038
5038
  case 'locale':
5039
5039
  this.globalize = new Internationalization(this.locale);
5040
5040
  this.l10n.setLocale(this.locale);
5041
- this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
5042
- Input.setPlaceholder(this.placeholder, this.inputElement);
5041
+ if (this.datepickerOptions && this.datepickerOptions.placeholder == null) {
5042
+ this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
5043
+ Input.setPlaceholder(this.placeholder, this.inputElement);
5044
+ }
5043
5045
  this.updateInput();
5044
5046
  if (this.enableMask) {
5045
5047
  this.notify('createMask', {
@@ -9329,8 +9331,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
9329
9331
  setLocale() {
9330
9332
  this.globalize = new Internationalization(this.locale);
9331
9333
  this.l10n.setLocale(this.locale);
9332
- this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
9333
- Input.setPlaceholder(this.placeholder, this.inputElement);
9334
+ if (this.dateRangeOptions && this.dateRangeOptions.placeholder == null) {
9335
+ this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
9336
+ Input.setPlaceholder(this.placeholder, this.inputElement);
9337
+ }
9334
9338
  this.updateInput();
9335
9339
  this.updateHiddenInput();
9336
9340
  this.changeTrigger();
@@ -9486,8 +9490,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
9486
9490
  case 'locale':
9487
9491
  this.globalize = new Internationalization(this.locale);
9488
9492
  this.l10n.setLocale(this.locale);
9489
- this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
9490
- Input.setPlaceholder(this.placeholder, this.inputElement);
9493
+ if (this.dateRangeOptions && this.dateRangeOptions.placeholder == null) {
9494
+ this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
9495
+ Input.setPlaceholder(this.placeholder, this.inputElement);
9496
+ }
9491
9497
  this.setLocale();
9492
9498
  break;
9493
9499
  case 'htmlAttributes':
@@ -12114,7 +12120,9 @@ let TimePicker = class TimePicker extends Component {
12114
12120
  this.setProperties({ locale: newProp.locale }, true);
12115
12121
  this.globalize = new Internationalization(this.locale);
12116
12122
  this.l10n.setLocale(this.locale);
12117
- this.updatePlaceHolder();
12123
+ if (this.timeOptions && this.timeOptions.placeholder == null) {
12124
+ this.updatePlaceHolder();
12125
+ }
12118
12126
  this.setValue(this.value);
12119
12127
  if (this.enableMask) {
12120
12128
  this.notify('createMask', {
@@ -13754,8 +13762,10 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13754
13762
  case 'locale':
13755
13763
  this.globalize = new Internationalization(this.locale);
13756
13764
  this.l10n.setLocale(this.locale);
13757
- this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
13758
- Input.setPlaceholder(this.l10n.getConstant('placeholder'), this.inputElement);
13765
+ if (this.dateTimeOptions && this.dateTimeOptions.placeholder == null) {
13766
+ this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
13767
+ Input.setPlaceholder(this.l10n.getConstant('placeholder'), this.inputElement);
13768
+ }
13759
13769
  this.dateTimeFormat = this.cldrDateTimeFormat();
13760
13770
  super.updateInput();
13761
13771
  break;
@@ -14018,6 +14028,7 @@ class MaskedDateTime {
14018
14028
  this.isDateZero = false;
14019
14029
  this.isMonthZero = false;
14020
14030
  this.isYearZero = false;
14031
+ this.isLeadingZero = false;
14021
14032
  this.dayTypeCount = 0;
14022
14033
  this.monthTypeCount = 0;
14023
14034
  this.hourTypeCount = 0;
@@ -14261,7 +14272,18 @@ class MaskedDateTime {
14261
14272
  }
14262
14273
  if (month >= 1) {
14263
14274
  newDateValue.setMonth(month - 1);
14264
- this.isNavigate = month.toString().length === 2;
14275
+ if (month >= 10 || month == 1) {
14276
+ if (this.isLeadingZero && month == 1) {
14277
+ this.isNavigate = month.toString().length === 1;
14278
+ this.isLeadingZero = false;
14279
+ }
14280
+ else {
14281
+ this.isNavigate = month.toString().length === 2;
14282
+ }
14283
+ }
14284
+ else {
14285
+ this.isNavigate = month.toString().length === 1;
14286
+ }
14265
14287
  if (newDateValue.getMonth() !== month - 1) {
14266
14288
  newDateValue.setDate(1);
14267
14289
  newDateValue.setMonth(month - 1);
@@ -14279,6 +14301,7 @@ class MaskedDateTime {
14279
14301
  }
14280
14302
  else {
14281
14303
  newDateValue.setMonth(0);
14304
+ this.isLeadingZero = true;
14282
14305
  this.isMonthPart = false;
14283
14306
  this.monthTypeCount = this.isMonthZero ? this.monthTypeCount + 1 : this.monthTypeCount;
14284
14307
  }