formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
619 stars 464 forks source link

[BUG] Unable to type in year #1019

Closed mfirthOmx closed 3 months ago

mfirthOmx commented 8 months ago

Environment

Please provide as many details as you can:

Steps to Reproduce

  1. Render a date column

Expected behavior

To be able to manually type in a year

Observed behavior

You are unable to type in a year, month is ok day is ok, year is not allowed

Example

If possible, please provide a screenshot, live example (via JSFiddle or similar), and/or example code to help demonstrate the issue.

For code or form JSON, please enclose in a code block: { "result": { "title": "Report Parameters", "components": [ { "type": "number", "input": true, "tableView": true, "datePicker": null, "enableMinDateInput": false, "enableMaxDateInput": false, "widget": null, "inputType": "number", "inputMask": null, "label": "Unit ID", "key": "Unit_ID", "placeholder": "Unit ID", "prefix": "", "suffix": "", "multiple": false, "defaultValue": "22202", "protected": false, "unique": false, "persistent": true, "validate": { "required": false, "minLength": 0, "maxLength": 0, "pattern": "", "custom": "", "customPrivate": false }, "conditional": { "show": "", "when": null, "eq": "" }, "size": null, "leftIcon": null, "rightIcon": null, "block": null, "action": null, "disableOnInvalid": null, "theme": null, "labelPosition": null, "format": null, "hidden": false, "enableTime": false, "disabled": true, "data": null, "datePickerMode": null }, { "type": "datetime", "input": true, "tableView": false, "datePicker": { "disableWeekends": false, "disableWeekdays": false, "minDate": "moment().subtract(10, 'years')", "maxDate": "moment()" }, "enableMinDateInput": true, "enableMaxDateInput": true, "widget": { "type": "calendar", "displayInTimezone": "viewer", "locale": "en", "useLocaleSettings": false, "allowInput": false, "mode": "single", "enableTime": false, "noCalendar": false, "format": "", "hourIncrement": 1, "minuteIncrement": 1, "time_24hr": false, "minDate": "moment().subtract(10, 'years')", "disableWeekends": false, "disableWeekdays": false, "maxDate": "moment()" }, "inputType": null, "inputMask": "", "label": "Start Date", "key": "START_DATE", "placeholder": null, "prefix": null, "suffix": null, "multiple": false, "defaultValue": "2023-10-16T00:00:00.0000000-04:00", "protected": false, "unique": false, "persistent": false, "validate": { "required": true, "minLength": 0, "maxLength": 0, "pattern": null, "custom": "", "customPrivate": false }, "conditional": null, "size": null, "leftIcon": null, "rightIcon": null, "block": null, "action": null, "disableOnInvalid": null, "theme": null, "labelPosition": null, "format": "MM/dd/YYYY", "hidden": false, "enableTime": false, "disabled": null, "data": { "allowInput": false }, "datePickerMode": "year" }, { "type": "datetime", "input": true, "tableView": false, "datePicker": { "disableWeekends": false, "disableWeekdays": false, "minDate": "moment().subtract(10, 'years')", "maxDate": "moment()" }, "enableMinDateInput": true, "enableMaxDateInput": true, "widget": { "type": "calendar", "displayInTimezone": "viewer", "locale": "en", "useLocaleSettings": false, "allowInput": false, "mode": "single", "enableTime": false, "noCalendar": false, "format": "", "hourIncrement": 1, "minuteIncrement": 1, "time_24hr": false, "minDate": "moment().subtract(10, 'years')", "disableWeekends": false, "disableWeekdays": false, "maxDate": "moment()" }, "inputType": null, "inputMask": "", "label": "End Date", "key": "END_DATE", "placeholder": null, "prefix": null, "suffix": null, "multiple": false, "defaultValue": "2023-10-17T00:00:00.0000000-04:00", "protected": false, "unique": false, "persistent": false, "validate": { "required": true, "minLength": 0, "maxLength": 0, "pattern": null, "custom": "", "customPrivate": false }, "conditional": null, "size": null, "leftIcon": null, "rightIcon": null, "block": null, "action": null, "disableOnInvalid": null, "theme": null, "labelPosition": null, "format": "MM/dd/YYYY", "hidden": false, "enableTime": false, "disabled": null, "data": { "allowInput": false }, "datePickerMode": "year" }, { "type": "button", "input": true, "tableView": false, "datePicker": null, "enableMinDateInput": false, "enableMaxDateInput": false, "widget": null, "inputType": null, "inputMask": null, "label": "Submit", "key": "submit", "placeholder": null, "prefix": null, "suffix": null, "multiple": false, "defaultValue": null, "protected": false, "unique": false, "persistent": false, "validate": { "required": false, "minLength": 0, "maxLength": 0, "pattern": null, "custom": "", "customPrivate": false }, "conditional": null, "size": "md", "leftIcon": "", "rightIcon": "", "block": false, "action": "submit", "disableOnInvalid": true, "theme": "primary", "labelPosition": null, "format": null, "hidden": false, "enableTime": false, "disabled": null, "data": null, "datePickerMode": null } ] }, "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }

daneformio commented 3 months ago

@mfirthOmx The format you are using is MM/dd/YYYY, but YYYY is not accepted. Using yyyy will work.

mfirthOmx commented 3 months ago

Works thank you thank you

From: daneformio @.> Date: Wednesday, March 13, 2024 at 9:47 AM To: formio/angular @.> Cc: Matthew Firth @.>, Mention @.> Subject: Re: [formio/angular] [BUG] Unable to type in year (Issue #1019)

@mfirthOmxhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mfirthOmx&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=5onCX6whq2CUGQZ4FYhaxWU7ewOwDtm4JP55tojAXfM&m=n3jLp6o368ha4vFpIsGw9eRn42mt0ixKXD77ZmL7upz3NkusPeiPiIjUHoZPFEw_&s=A4mZ6Gld6Hfl4LGuCbD6tdvKpRPhgojBhpHLUWs0iJM&e= The format you are using is MM/dd/YYYY, but YYYY is not accepted. Using yyyy will work.

— Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_formio_angular_issues_1019-23issuecomment-2D1994445477&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=5onCX6whq2CUGQZ4FYhaxWU7ewOwDtm4JP55tojAXfM&m=n3jLp6o368ha4vFpIsGw9eRn42mt0ixKXD77ZmL7upz3NkusPeiPiIjUHoZPFEw_&s=pE3AIsGq7yZV2gVH4cSunwLs2oD4VzBud5q4CbH091M&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_A7YSAT6E54V2KNXHSHSWHCDYYBKFDAVCNFSM6AAAAAA6D44PVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUGQ2DKNBXG4&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=5onCX6whq2CUGQZ4FYhaxWU7ewOwDtm4JP55tojAXfM&m=n3jLp6o368ha4vFpIsGw9eRn42mt0ixKXD77ZmL7upz3NkusPeiPiIjUHoZPFEw_&s=iU3smmjaV5s1vEUjaGATlFkDtiZO2cD6QiEzH4JoBxs&e=. You are receiving this because you were mentioned.Message ID: @.***>

daneformio commented 3 months ago

Great! Closing as resolved.