0

私はJQueryMobileの初心者です.jsfiddleでテストすると問題なく動作しますが、Android Emulatorで実行すると、この画像のようになります。日付と時刻のピッカーがありません

以下は私のサンプルコードです、

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title></title>
        <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
        <link rel="stylesheet" href="resources/css/my.css" />
                
        <link rel="stylesheet" type="text/css" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" />
        <link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.min.css" />

        <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>

        <!-- Optional Mousewheel support: http://brandonaaron.net/code/mousewheel/docs -->
        <script type="text/javascript" src="resources/js/jquery.mousewheel.min.js"></script>

        <script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.core.min.js"></script>
        <script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.calbox.min.js"></script>
        <script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.datebox.min.js"></script>
        
        <script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/i18n/jquery.mobile.datebox.i18n.en_US.utf8.js"></script>
        
        
        <style>
            /* App custom styles */
        </style>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
        <script src="resources/js/my.js"></script>
    </head>
    <body>
        <!-- Home -->
        <div data-role="page" id="page1">
            <div data-theme="b" data-role="header">
                <a data-role="button" data-inline="true" data-transition="slide" data-theme="b" href="#page1" class="ui-btn-left">
                    Calendar
                </a>
                <a data-role="button" data-inline="true" data-transition="slide" href="#page1" class="ui-btn-right">
                    Save
                </a>
                <h4>
                    Edit Event
                </h4>
            </div>
            <div data-role="content">
                <div data-role="fieldcontain">
                        <label for="txtTitle">
                            Title
                        </label>
                        <input name="" id="txtTitle" placeholder="" value="" type="text" />                    
                </div>
                
                <div data-role="fieldcontain">
                  <label for="link1">Start Time*</label>
                  <input name="link1" type="text" data-role="datebox" data-options='{"mode": "timebox"}' id="link1" />
                  <label for="link3">End Time*</label>
                  <input name="link3" type="text" data-role="datebox" data-options='{"mode": "timebox"}' id="link3" />
                  <label for="mydate">Date*</label>
                  <input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "calbox"}'>
                </div>
                
            </div>
        </div>
        <script>
            //App custom javascript
        </script>
    </body>
</html>​

誰でも私を導くことができることに感謝します。

4

1 に答える 1

1

これはエミュレーターに問題があるようです。私のデバイス (HTC Desire with Android 2.2) で例をテストしたところ、正常に動作します。スクリーンショットを参照してください。
ここに画像の説明を入力

唯一の問題は、アイコンのいずれかを押した後にキーボードも開くことです...しかし、それは別の問題です...ここに画像の説明を入力

キーボードの問題に関しては、これらの回答をご覧になることをお勧めします

于 2012-10-29T22:33:36.957 に答える