chrv-components 1.12.119 → 1.12.121

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
@@ -4187,7 +4187,7 @@ class ChrInputComponent {
4187
4187
  * @description Used to return either a number from a number input (instead of the text value of the number) or a javascript Date object instead of the text value of said date.
4188
4188
  * @default The default is 'text' . If the input type is 'number', 'date', or 'datetime' however, it will default to the correct type but may be overriden by setting this property.
4189
4189
  */
4190
- this.outputType = model('text', /* @ts-ignore */
4190
+ this.outputType = model(null, /* @ts-ignore */
4191
4191
  ...(ngDevMode ? [{ debugName: "outputType" }] : /* istanbul ignore next */ []));
4192
4192
  /**
4193
4193
  * Step between two values. Only used when supported by the native HTML Input Element.
@@ -4332,10 +4332,22 @@ class ChrInputComponent {
4332
4332
  };
4333
4333
  this.ensureOutputType = () => {
4334
4334
  const type = this.type();
4335
- if (type == 'number')
4336
- this.outputType.set('number');
4337
- if (type == 'date' || type == 'datetime')
4338
- this.outputType.set('date');
4335
+ const outputType = this.outputType();
4336
+ if (outputType == null) {
4337
+ switch (type) {
4338
+ case 'number':
4339
+ this.outputType.set('number');
4340
+ break;
4341
+ case 'date':
4342
+ this.outputType.set('date');
4343
+ break;
4344
+ case 'datetime':
4345
+ this.outputType.set('date');
4346
+ break;
4347
+ default:
4348
+ this.outputType.set('text');
4349
+ }
4350
+ }
4339
4351
  };
4340
4352
  this.onChange = (value) => {
4341
4353
  if (value instanceof Event) {