Seeking Up/Down Arrows HTML numerical input feature specifically designed for iOS devices

I am having an issue with a number input box on iOS. I am utilizing jquery, kendo mobile, and HTML5 for this particular task.

While the number input displays up and down arrows in the Icenium simulator, they are not showing on the iPad. I am seeking a solution to make these arrows appear on the iPad as well. Despite my research efforts, I have not been able to find a direct answer.

My main question is: Is it feasible to have these arrows displayed for a number input on the iPad (e.g. for quantity)? If not, are there alternative methods to create a similar functionality using kendo mobile, HTML, or CSS? Any suggestions would be greatly appreciated.

Here is a visual representation of what I am looking for

<input type="number" value="numberText"/>
<style>    
input[type=number]
    {
        padding:10px;
    }
</style>

Thank you

Answer №1

attempt:

<!DOCTYPE html>
<html lang="en">
    <script src='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'></script>
    <style>
        .number-wrapper {
            margin: 10px 5px;
            position: relative;
        }
        .number {
            font-size: 30px;
            color: #eee;
            display: inline-block;
            *display: inline;
            *zoom: 1;
            background: #000;
            -moz-background-clip: padding;
            -webkit-background-clip: padding-box;
            background-clip: padding-box;
            padding: 0 12px;
            height: 80px;
            line-height: 80px;
            text-align: center;
            border: 1px solid #555;
            -moz-box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.2);
            -webkit-box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.2);
            box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.2);
            -moz-text-shadow: 0 3px 3px #000000;
            -webkit-text-shadow: 0 3px 3px #000000;
            text-shadow: 0 3px 3px #000000;
        }
        .inc {
            position: absolute;
            display: block;
            top: -35px;
            left: 0;
            font-weight: bold;
            font-size: 18px;
            color: #777;
            width: 100%;
            height: 90%;
            text-align: center;
            padding-top: 6px;
        }
        .dec {
            position: absolute;
            display: block;
            bottom: -18px;
            left: 0;
            padding-top: 14px;
            font-weight: bold;
            font-size: 18px;
            color: #777;
            width: 100%;
            height: 90%;
            text-align: center;
        }
        .line {
            position: absolute;
            width: 100%;
            height: 1px;
            top: 52%;
            left: 0;
            background: #000;
            -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
            -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
        }
    </style>
    <body>
        <div id="SETtime">
            <span class="number-wrapper"><div class="line"></div><span class="inc">+</span><span id="mx" class="number m">00</span><span class="dec">-</span></span>
        </div>
    </body>
    <script>
        function twodigits(num) {
            return ('0' + num).slice(-2);
        }

        $('.inc').click(function() {
            var target = $(this).siblings('.number').first();
            var value = parseInt(target.text());
            value++;
            target.text(twodigits(value));
        });

        $('.dec').click(function() {
            var target = $(this).siblings('.number').first();
            var value = parseInt(target.text());
            value--;
            target.text(twodigits(value));
        });
    </script>
</html>

Sunshine-filled moments!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips for importing font files from the node_module directory (specifically otf files)

We cannot seem to retrieve the fonts file from the node module and are encountering this error message. Can't find 'assets/fonts/roman.woff2' in 'C:\Projects\GIT2\newbusinessapp\projects\newbusinessapp\src ...

Excerpts capturing the significance of HTML attribute values

$(document).ready(function () { for (var n = 0; n < 3 ; n++) { $("body").append("<p id=\"element"+n+"\">Greetings, I am Element " + n + ".<p>"); } }); In the third line of code, which pairs of quotation marks match ...

Flickering in CSS transitions on Microsoft Edge

There seems to be a peculiar issue with CSS transitions in Microsoft Edge. The problem arises when there is a transition, such as between hover states, but the styles specified for those states are overridden by other styles in the CSS hierarchy. In such ...

Error encountered: Required closing JSX tag for <CCol> was missing

Encountered a strange bug in vscode...while developing an app with react.js. Initially, the tags are displaying correctly in the code file. However, upon saving, the code format changes causing errors during runtime. For instance, here is an example of the ...

What is the best way to start tiny-slider automatically once the video has ended?

I am currently using the tns-slider plugin and have a setup with 3 slides (2 photos and 1 video). <div class='tiny-slider'> <div class='slide slide1'> <div class='video-slide'> <video id=&qu ...

Despite utilizing the .img-fluid class, the image remains incompatible with the parent div and does not fit properly

So, I'm currently working on a test code where my aim is to fit an image into the parent div using Bootstrap 5. However, I'm facing a challenge where the image leaves a noticeable gap width-wise, despite using the .img-fluid class. You can see th ...

Why is it that an HTML entity-containing string doesn't show the character after going through the htmlspecialchars() function?

In my project, I have a string of text retrieved from the SQL database which is then sanitized using PHP's strip_tags and htmlspecialchars functions to eliminate any HTML formatting that users might try to inject. This processed text is displayed in b ...

Tips for keeping the Menu bar at the top of the page while scrolling from the middle

I came across a technique mentioned here that I wanted to implement. I used this jsfiddle link (which worked well) to create my own version http://jsfiddle.net/a2q7zk0m/1/, along with a custom menu. However, now it seems like it's not working due to a ...

Disregard any labels when it comes to clickable areas for mouse events

Here is a simple example in JSFiddle where a text is displayed over an image inside a div element. Depending on where the cursor hovers, it can exhibit three different behaviors: pointing hand over the image, allowing text selection over the content of the ...

Is it possible to mix units within the 'path' element in SVG?

Utilizing SVG's rectangle element, you can specify dimensions as a percentage of its owner's dimensions and set a radius in pixels. By using the code below: <div style="position: relative;"> <object class="AIRound" t ...

Achieving True Nested Divs: Making Children Truly Inside

I want to create nested divs for positioning children with top and left properties, allowing them to overlap each other: https://jsfiddle.net/e0cpuarv/ .boo { position: absolute; left: 10px; top: 10px; width: 100px ...

Enhance your textbox with more detailed descriptions than just displaying NaN

I am working on a form that includes select boxes. If a user selects an option from "Convert From" and another option from "Convert To" but does not enter a number in the input field, instead of displaying NaN in the result text box, I would like to show ...

Reduced complications with mixin scopes

I have developed a parametric mixin that utilizes a unique "node-value" system to locate the children of an element. The process involves detecting the children through a loop function named ".extractArrays", which contains ".deliverChild" within it. Subse ...

Looking to display the view source of an HTML page, but it keeps redirecting to another site when I try. Anyone know how to diagnose and fix this issue?

Can anyone assist me in displaying the HTML source of a page without it redirecting to another site? Here is the URL: ...

Ways to transfer data from TypeScript to CSS within Angular 6

Trying to work with ngClass or ngStyle, but I'm struggling with passing the value. Here's my current code: strip.component.ts import { ... } from '@angular/core'; @Component({ selector: 'app-strip', templateUrl: &apo ...

Localization for Timeago JS Plugin

Currently, I have integrated the jQuery TimeAgo plugin into my project and included the following code snippet for localization in Portuguese: // Portuguese jQuery.timeago.settings.strings = { suffixAgo: "atrás", suffixFromNow: "a partir de agora", ...

Choosing several checkboxes and populating an array with values - HTML and JavaScript

I am working on a modal dialog that displays a table with checkboxes next to user names. My goal is to link these checkboxes to the respective names so that when a box is checked next to 'Jon' in the table, the name 'Jon' gets selected. ...

Tips for avoiding anti-aliasing of bitmap font on Internet Explorer and Firefox

I am currently experiencing issues with font smoothing when using a basic bitmap font for icons. While the font appears crisp in Chrome, it appears blurry in IE and FF. Do you have any recommendations on how to resolve this problem? You can view a screen ...

I'm looking for a method in JavaScript that can search through my XML file to locate specific attributes and return the entire parent element containing that attribute. Can anyone help with

I'm completely new to XML and Javascript. I currently have this code in my HTML file: <select id="eigenschaften" name="eigenschaften" type="text" onchange=""> <option value="">Choose Property</option> <option value="soci ...

The nested ThemeProvider takes priority over the theme's style definitions

Is there a way to render a component and then apply additional rendering using useEffects in React? The issue I am facing is that when I have a component with a specific theme, each useEffect call ends up overriding the style of the original component wit ...