@descope/web-components-ui 1.95.0 → 1.97.0

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/dist/index.esm.js CHANGED
@@ -6546,7 +6546,10 @@ class DateCounter {
6546
6546
 
6547
6547
  data = [...data, num];
6548
6548
 
6549
- if (this.numberValue > this.max) {
6549
+ // we need to re-evaluate the number value
6550
+ const numVal = Number(data.join(''));
6551
+
6552
+ if (numVal > this.max) {
6550
6553
  data = [num];
6551
6554
  } else if (this.length < data.length) {
6552
6555
  data = data.slice(1, data.length);
@@ -6665,7 +6668,7 @@ class RawDateFieldClass extends BaseInputClass$a {
6665
6668
 
6666
6669
  this.attachShadow({ mode: 'open' }).innerHTML = `
6667
6670
  <div>
6668
- <descope-text-field>
6671
+ <descope-text-field inputmode="numeric">
6669
6672
  <span slot="suffix" class="toggle-calendar">
6670
6673
  ${calendarIcon}
6671
6674
  </span>
@@ -7035,10 +7038,11 @@ class RawDateFieldClass extends BaseInputClass$a {
7035
7038
 
7036
7039
  if (!this.inputElement.value) {
7037
7040
  this.inputElement.value = this.format;
7038
- // If no value, on focus select the first part of the format placeholder
7039
- this.selectedCounterIdx = 0;
7040
- this.setInputSelectionRange();
7041
7041
  }
7042
+
7043
+ // On focus select the first part of the format placeholder
7044
+ this.selectedCounterIdx = 0;
7045
+ this.setInputSelectionRange();
7042
7046
  }
7043
7047
 
7044
7048
  onBlur() {