Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    useMask ignored when browserInputType is set to digits on date/time FormItems

    SmartClient Version: v13.1p_2026-06-08/AllModules Development Only (built 2026-06-08)
    SmartClient Version: v14.1p_2026-06-11/AllModules Development Only (built 2026-06-11)

    Hi, I've noticed that when using browserInputType: "digits" on FormItems of type date/time with useMask: true, the mask is not displayed.

    However, the mask is correctly applied when using browserInputType: "tel".

    Is this expected behavior (i.e., a limitation or unsupported combination), or could this be a bug?

    Test case:

    Code:
    isc.DynamicForm.create({
        items:[
            {name:"aDateTimeItem", type:"datetime", textFieldProperties:{browserInputType:"digits"}, useMask:true},
            {name:"aTimeItem", type:"time", textFieldProperties:{browserInputType:"tel"}, useMask: true}
        ]
    })
    with browserInputType:"digits":

    Click image for larger version

Name:	IMG_7124.PNG
Views:	6
Size:	179.4 KB
ID:	277590

    with browserInputType:"tel":

    Click image for larger version

Name:	IMG_7125.PNG
Views:	6
Size:	174.7 KB
ID:	277589

    #2
    hi Claudio,

    It's expected behavior.

    browserInputType: "digits" maps to <input type="number"> in the DOM, which rejects non-numeric characters - so mask placeholders like _ can't work. You'll see a warning in the developer console.

    "tel" works because <input type="tel"> accepts any characters while still showing a numeric mobile keyboard, so it's the right choice when you need both a numeric keyboard and useMask.

    Comment


      #3
      Hi, thanks for the clarification, I hadn't noticed the warning in the developer console, I'll use browserInputType: "tel" in this case.

      Comment

      Working...
      X