@magic-xpa/gui 4.801.1 → 4.801.4
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/esm2020/src/Manager.mjs +2 -2
- package/esm2020/src/management/gui/DisplayConvertor.mjs +6 -15
- package/esm2020/src/management/gui/FieldValidator.mjs +2 -2
- package/fesm2015/magic-xpa-gui.mjs +7 -16
- package/fesm2015/magic-xpa-gui.mjs.map +1 -1
- package/fesm2020/magic-xpa-gui.mjs +7 -16
- package/fesm2020/magic-xpa-gui.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1595,7 +1595,7 @@ class Manager {
|
|
|
1595
1595
|
return Commands.getValue(ctrl, ctrl.getDisplayLine(true));
|
|
1596
1596
|
}
|
|
1597
1597
|
static async SetReadOnlyControl(ctrl, isReadOnly) {
|
|
1598
|
-
if (ctrl.isTextControl() || ctrl.IsRepeatable) {
|
|
1598
|
+
if (ctrl.isTextControl() || ctrl.IsRepeatable || ctrl.isComboBox() || ctrl.isListBox() || ctrl.isCheckBox()) {
|
|
1599
1599
|
if (UtilStrByteMode.isLocaleDefLangDBCS()) {
|
|
1600
1600
|
if (await ctrl.getForm().getTask().checkProp(PropInterface.PROP_TYPE_ALLOW_LOCATE_IN_QUERY, false))
|
|
1601
1601
|
return;
|
|
@@ -5638,25 +5638,16 @@ class DisplayConvertor {
|
|
|
5638
5638
|
case PICInterface.PIC_YY:
|
|
5639
5639
|
{
|
|
5640
5640
|
this.int_2_a(outVal, outIdx, 2, breakParams.year, '0');
|
|
5641
|
-
let yearStr = NString.FromChars(outVal);
|
|
5642
|
-
year = +yearStr
|
|
5643
|
-
outIdx += 2;
|
|
5644
|
-
len -= 2;
|
|
5645
|
-
}
|
|
5646
|
-
break;
|
|
5647
|
-
case PICInterface.PIC_YY:
|
|
5648
|
-
{
|
|
5649
|
-
this.int_2_a(outVal, outIdx, 2, breakParams.year, '0');
|
|
5650
|
-
let yearStr = NString.FromChars(outVal);
|
|
5651
|
-
year = +yearStr.substr(outIdx);
|
|
5641
|
+
let yearStr = NString.FromChars(outVal, outIdx, 2);
|
|
5642
|
+
year = +yearStr;
|
|
5652
5643
|
outIdx += 2;
|
|
5653
5644
|
len -= 2;
|
|
5654
5645
|
}
|
|
5655
5646
|
break;
|
|
5656
5647
|
case PICInterface.PIC_YYYY:
|
|
5657
|
-
this.int_2_a(outVal, outIdx, 4, year, '0');
|
|
5658
|
-
let yearStr = NString.FromChars(outVal);
|
|
5659
|
-
year = +yearStr
|
|
5648
|
+
this.int_2_a(outVal, outIdx, 4, breakParams.year, '0');
|
|
5649
|
+
let yearStr = NString.FromChars(outVal, outIdx, 4);
|
|
5650
|
+
year = +yearStr;
|
|
5660
5651
|
outIdx += 4;
|
|
5661
5652
|
len -= 4;
|
|
5662
5653
|
break;
|
|
@@ -10386,7 +10377,7 @@ class FieldValidator {
|
|
|
10386
10377
|
return valDet;
|
|
10387
10378
|
}
|
|
10388
10379
|
if (ctrl.DataType !== StorageAttribute.ALPHA && ctrl.DataType !== StorageAttribute.UNICODE && ctrl.DataType !== StorageAttribute.BLOB) {
|
|
10389
|
-
if ((typeof this._newvalue === 'string' && this._newvalue.trim().length === 0) || (ctrl.DataType === StorageAttribute.DATE && (ctrl.isDateZero(this._newvalue) || this.isNullDisplayVal()))) {
|
|
10380
|
+
if ((typeof this._newvalue === 'string' && this._newvalue.trim().length === 0) || (ctrl.DataType == StorageAttribute.NUMERIC && this._newvalue == null) || (ctrl.DataType === StorageAttribute.DATE && (ctrl.isDateZero(this._newvalue) || this.isNullDisplayVal()))) {
|
|
10390
10381
|
let field = ctrl.getField();
|
|
10391
10382
|
let defaultValue = field.getDefaultValue();
|
|
10392
10383
|
let text = null;
|