InfyOmLabs/adminlte-generator

scaffolding: wrong return format from date picker

berteh opened this issue · 2 comments

Hello.

Just trying your nice generator, cloned the current git repository, and ran a scaffolding command from fieldsFile with a date attribute as follows:

{
        "name": "balance_date",
        "dbType": "date",
        "htmlType": "date",
        "validations": "",
        "searchable": true,
        "fillable": true,
        "primary": false,
        "inForm": true,
        "inIndex": true,
        "inView": true
    },

When adding an instance of the said element, the date picker for the balance_date fields shows fine, but clicking any date generates the following error in web console: The specified value "2020-11-26 18:43:58" does not conform to the required format, "yyyy-MM-dd". No date is put in the field, which is in the meantime impossible to "simply" edit manually as a text value.

How can I fix this ?.. preferably enabling manual editing of the value at the same time.

Thanks too all contributors for the seemingly great tool.
Berteh.

@berteh I tested with the following fields and working fine

[
    {
        "name": "id",
        "dbType": "increments",
        "htmlType": "",
        "validations": "",
        "searchable": false,
        "fillable": false,
        "primary": true,
        "inForm": false,
        "inIndex": false,
        "inView": false
    },
    {
        "name": "title",
        "dbType": "string",
        "htmlType": "text",
        "validations": "required",
        "searchable": true
    },
    {
        "name": "balance_date",
        "dbType": "date",
        "htmlType": "date",
        "validations": "",
        "searchable": true,
        "fillable": true,
        "inForm": true,
        "inIndex": true,
        "inView": true
    },
    {
        "name": "created_at",
        "dbType": "timestamp",
        "htmlType": "",
        "validations": "",
        "searchable": false,
        "fillable": false,
        "primary": false,
        "inForm": false,
        "inIndex": false
    },
    {
        "name": "updated_at",
        "dbType": "timestamp",
        "htmlType": "",
        "validations": "",
        "searchable": false,
        "fillable": false,
        "primary": false,
        "inForm": false,
        "inIndex": false
    }
]

thanks for the feedback. I'll test it again with your fields.