chrv-components 1.12.122 → 1.12.123
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.
|
Binary file
|
|
@@ -4352,12 +4352,20 @@ class ChrInputComponent {
|
|
|
4352
4352
|
this.ensureDefaultDisplayValue = () => {
|
|
4353
4353
|
const value = this.value() || this.ngControl()?.value;
|
|
4354
4354
|
const type = this.type();
|
|
4355
|
-
if (
|
|
4356
|
-
this.displayValue.set(formatDate$1(value, 'yyyy-MM-dd'));
|
|
4357
|
-
if (value === null || value === undefined)
|
|
4355
|
+
if (value === null || value === undefined) {
|
|
4358
4356
|
this.displayValue.set('');
|
|
4359
|
-
|
|
4360
|
-
|
|
4357
|
+
return;
|
|
4358
|
+
}
|
|
4359
|
+
switch (type) {
|
|
4360
|
+
case 'date':
|
|
4361
|
+
this.displayValue.set(formatDate$1(value, 'yyyy-MM-dd'));
|
|
4362
|
+
break;
|
|
4363
|
+
case 'datetime':
|
|
4364
|
+
this.displayValue.set(formatDate$1(value, "yyyy-MM-dd'T'HH:mm"));
|
|
4365
|
+
break;
|
|
4366
|
+
default:
|
|
4367
|
+
this.displayValue.set(value);
|
|
4368
|
+
}
|
|
4361
4369
|
};
|
|
4362
4370
|
this.onChange = (value) => {
|
|
4363
4371
|
if (value instanceof Event) {
|