Numeric Keyboard on iPhone?

6 posts, 0 answers
  1. Johann
    Johann avatar
    28 posts
    Member since:
    Jun 2015

    Posted 04 Mar Link to this post

    Hi,

    I use the numericTextBox in our Cordova/AngularJS application. If I focus the numericTextBox it opens the normal alpha-numeric keyboard and not the numeric keyboard like expected.

    Is it possible to make that the numeric keyboard appears on focus?

    With best regards

    Johann

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 08 Mar Link to this post

    Hello Johann,

    The widget changes the type of the input to "text" in order to support decimal separators different than ".". You can find more details here: If changing the type is not an option for you, then you can add pattern attribute to the input element. Thus the iOS Safari will open a relevant virtual keyboard layout to the defined pattern value.

    Regards,
    Georgi Krustev
    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. Johann
    Johann avatar
    28 posts
    Member since:
    Jun 2015

    Posted 14 Mar in reply to Georgi Krustev Link to this post

    Hi,

    I've tried the numericTextBox now with a numeric "pattern" but I still get no numeric Keyboard on iOS or Windows Phone.

    With best regards,

    Johann

  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 16 Mar Link to this post

    Hello Johann,

    Indeed, it seems that the pattern attribute is no longer supported in latest iOS. The only solution in this case is to change the type of the input element:
    <script>
        $(function() {
          $("#numeric").kendoNumericTextBox();
          $("#numeric").attr("type", "number");
        });
      </script>

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Grant
    Grant avatar
    8 posts
    Member since:
    Aug 2011

    Posted 22 Jul in reply to Georgi Krustev Link to this post

    I have the same question but for a kendoGrid. Is it possible to force the browser to open a number keypad for a field in the grid?
  7. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 26 Jul Link to this post

    Hello Grant,

    The mobile browsers would decide what virtual keyboard to open based on the input type:

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type

    If you would like to display "number" keypad, then you will need to change the type of the input to "number", as it is shown in the previous reply.

    Regards,
    Georgi Krustev
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top
Kendo UI is VS 2017 Ready