-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(angular): add formly date element (#573)
* feat(angular): add formly date element * feat(angular): fix build --------- Co-authored-by: Tim Sielemann <[email protected]>
- Loading branch information
1 parent
4113e59
commit 896cd9d
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
angular/projects/catalyst-formly/src/lib/formly/formly-date/formly-date.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Component } from '@angular/core'; | ||
import { FieldType, FieldTypeConfig } from '@ngx-formly/core'; | ||
|
||
@Component({ | ||
selector: 'formly-date', | ||
template: ` | ||
<cat-date | ||
[formControl]="formControl" | ||
[formlyAttributes]="field" | ||
[requiredMarker]="props.requiredMarker" | ||
[horizontal]="props.horizontal" | ||
[autoComplete]="props.autoComplete" | ||
[clearable]="props.clearable" | ||
[hint]="props.hint" | ||
[icon]="props.icon" | ||
[iconRight]="props.iconRight" | ||
[identifier]="props.identifier" | ||
[label]="props.label" | ||
[labelHidden]="props.labelHidden" | ||
[max]="props.max" | ||
[min]="props.min" | ||
[name]="props.name" | ||
[placeholder]="props.placeholder" | ||
[textPrefix]="props.textPrefix" | ||
[textSuffix]="props.textSuffix" | ||
[readonly]="props.readonly" | ||
[errors]="props.errors" | ||
[errorUpdate]="props.errorUpdate" | ||
[errorInit]="props.errorInit" | ||
[nativeAttributes]="props.nativeAttributes" | ||
> | ||
</cat-date> | ||
` | ||
}) | ||
export class CatDateFieldType extends FieldType<FieldTypeConfig> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters