Skip to content

Not including 'format' option in schema for an 'inputType: date' fails v2.2.2 #480

Closed
@evild70

Description

@evild70

Not including the format option in the schema an input with the inputType: date will cause validation to fail. It will reset the input and put the UNIX timestamp into the model. It will then put the following warning in the Chrome console:

The specified value "1286686800000" does not conform to the required format, "yyyy-MM-dd".

This issue does not exist in v2.1.1.

Correct schema:

{
    type: 'input',
    inputType: 'date',
    model: 'date',
    format: 'YYYY-MM-DD',
    validator: VueFormGenerator.validators.date
}

Example: https://jsfiddle.net/evild70/w3e0p2a6/ (see Chrome console for warning)

I couldn't find any mention of this in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions