当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - Mobile JQuery Advancements

问题描述:

I am trying to apply date picker and time picker controls in mobile views

. I have tried a lot but everything went in vein. Atlast my hope is stack overflow. Please

help me if somebody has applied Datepickers or time pickers in mobile views then please tell me the procedure to apply that. Thank You very much

I have tried one way that is given over here

http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/

I am using Jquery.mobile.1.3, the latest. I have written this in script and css section

<link rel="stylesheet" href="jquery.ui.datepicker.mobile.css" />

<script src="jQuery.ui.datepicker.js"></script>

<script src="jquery.ui.datepicker.mobile.js"></script>

and used control in similar way as mentioned but it never worked for me

<input type="date" name="date" id="date" value="" />

网友答案:

did you even read http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker ?

you need four things:

1) a label in html

<label for="date">Date Input:</label>

2) an input field in html

<input type="date" name="date" id="date" value=""  />

3) an include of js files in html

<script src="jQuery.ui.datepicker.js"></script>
<script src="jquery.ui.datepicker.mobile.js"></script>

4) an altering of standard date behaviour in script

$( document ).bind( "mobileinit", function(){
    $.mobile.page.prototype.options.degradeInputs.date = true;
});

regards zY

分享给朋友:
您可能感兴趣的文章:
随机阅读: