Masked textbox not guaranteed

5 posts, 0 answers
  1. Tayger
    Tayger avatar
    61 posts
    Member since:
    Jan 2015

    Posted 14 Mar Link to this post

    Hello

    I wanted to let you know that you can "cheat" masked textbox. I created a masked textbox allowing hours, minutes and seconds in format: hh:mm:ss while "mm" and "ss" cannot be higher than 59 as it makes sense:

    $("#eventobjecttime").kendoMaskedTextBox({
    mask: "00:~0:~0",
    value: "00:00:00",
    rules: {
    "~": /[0-5]/,
    }
    });

    That works fine but if I enter f.e. "05:47:58" (what is fine and allowed by set rule), set the cursor behind the "05" (hours) and press DEL left key (as I want to delete the "5" the part right (mm:ss) shifts to left. You now see: 04:75:8_ Ooops! I can jump out of the textbox and nothing is complaining. The other way around (f.e. pasting something in between) is possible to. So the masked textbox does not guarantee the user can not override the rules.

    Do you have any idea how I can make sure the masked textbox can not be overridden?

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    353 posts

    Posted 17 Mar Link to this post

    Hello Tayger,

    I apologize for the delayed response.
     
    This is indeed a bug in the MaskedTextBox, it has been logged and you can expect it fixed in a future release. You can track it here:

    https://github.com/telerik/kendo-ui-core/issues/605

    Unfortunately, there is no quick fix or workaround that I can offer. I am sorry for any inconvenience this might cause.

    Regards,
    Dimiter Topalov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Tayger
    Tayger avatar
    61 posts
    Member since:
    Jan 2015

    Posted 20 Mar in reply to Dimiter Topalov Link to this post

    Hi Dimiter

    Thats ok, I can live with the fact it will be fixed in a future release.

  5. Tayger
    Tayger avatar
    61 posts
    Member since:
    Jan 2015

    Posted 21 Mar in reply to Dimiter Topalov Link to this post

    You also may add (as bug) that the given mask and rule:

    mask: "00:~0:~0",
    rules: { "~": /[0-5]/ }

    also allows to jump out with a value like "00:00:__"
    This is imho not ok due mask "0" does not allow spaces, while "9" does accept space values: http://docs.telerik.com/kendo-ui/api/javascript/ui/maskedtextbox#configuration-mask

     

  6. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    353 posts

    Posted 23 Mar Link to this post

    Hi Tayger,

    Thank you for reporting this issue, it will be added as an issue and fixed accordingly.

    Regards,
    Dimiter Topalov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready