-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
The 'date' in IField.type is not handled correctly. There is no component for Date, so nothing will be rendered if I specify that. Furthermore, I can't specify it as a type for the input component.
Example:
const fields: IField[] = [
{
type: 'date', // wont work
name: 'dob',
attributes: {
// type: 'date', // cant specify that
id: 'dob', // required
classes: ['form-control'],
placeholder: 'DOB',
autocomplete: 'off'
},
}
];
...
<Formly fields={fields} {form_name} on:submit={onSubmit} />
Fix in types.ts
export interface IField {
type: 'input' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'file' | 'autocomplete'; // remove 'date'
}
export interface Attributes {
id: string;
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'range' | 'date'; // add 'date'
``
Metadata
Metadata
Assignees
Labels
No labels