surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.22k stars 815 forks source link

Input masks: The `"mm/dd/yy"` pattern doesn't work when `min` and `max` values are specified #9050

Closed JaneSjs closed 4 days ago

JaneSjs commented 1 week ago

T20608 - Input Mask Settings date validation error https://surveyjs.answerdesk.io/internal/ticket/details/T20608


With the following JSON, it is impossible to correctly specify a date:

{
  "pages": [
    {
      "name": "page1",
      "elements": [
        {
          "type": "text",
          "name": "question1",
          "maskType": "datetime",
          "maskSettings": {
            "pattern": "mm/dd/yy",
            "min": "2023-11-13",
            "max": "2024-12-13"
          }
        }
      ]
    }
  ],
  "showQuestionNumbers": "off",
  "widthMode": "static",
  "width": "500px"
}

https://github.com/user-attachments/assets/39bf1323-7445-4b89-8297-e4ca9e0ae1c4