-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move 'date' from type IField.type to Attributes.type #65
Comments
the date field type is an in input category so not should : const fields = [
{
type: 'input',
name: 'dob',
attributes: {
type: 'date',
id: 'dob',
classes: ['form-control'],
placeholder: 'DOB',
autocomplete: 'off'
},
}
]; |
Yes, but that is not reflected in the exported types. I.e., the type definitions need to change. Currently, it is specified as a possible value for IField.type, but not as an Attribute.type. |
the idea is to force developer respect the struct types of fields, type here: which mean you don't need to mention type in attributes object, same thing with field "textarea", "select", "file" and "autocomplete", for more details check documentation here |
I do understand your intend, I am saying that it does not work :) See If I find the time, I'll look into creating the PR, but I did specify the Fix in the description as well. The alternative would ofc be to have a Date.svelte component. |
@sebastianfiss-consid i got you and i will fixe this issue soon because i will update the package for current version of svelte. |
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:
Fix in types.ts
The text was updated successfully, but these errors were encountered: