日期和时间选择器 [英] Date and time picker
本文介绍了日期和时间选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我厌倦了使用带有时间选择器控件的日期,我使用了此链接中的代码
I tired to use the date with time picker control and I used the code from this link
http://www.aspsnippets.com/Articles/Implement-DateTimePicker-in-ASP.Net-using-jQuery-Plugin.aspx
。
当我点击更改时间选项时,当鼠标移动到屏幕上的任何位置时,自动滚动时间。这段代码中是否有任何错误?
.
when I click to change the time option, automatically the time is scrolling either way when move the mouse anywhere on the screen.Is there any error in this code?
<script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.dynDateTime.min.js" type="text/javascript"></script>
<script src="Scripts/calendar-en.min.js" type="text/javascript"></script><link href="Styles/calendar-blue.css" rel="stylesheet" type="text/css" /><script type="text/javascript">
$(document).ready(function () {
$("#<%=TextBox1.ClientID %>").dynDateTime({
showsTime: true,
ifFormat: "%Y/%m/%d %H:%M",
daFormat: "%l;%M %p, %e %m, %Y",
align: "BR",
electric: true,
singleClick: true,
displayArea: ".siblings('.dtcDisplayArea')",
button: ".next()"
});
});
</script><asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<asp:TextBox ID="TextBox1" runat="server" ReadOnly = "true"></asp:TextBox>
<img src="calender.png" />
<asp:Button ID="btnSave" runat="server" Text="Save" />
</asp:Content>
推荐答案
(document).ready(function(){
(document).ready(function () {
(#<%= TextBox1.ClientID%>)。dynDateTime({
showsTime:true,
ifFormat:%Y /%m /%d%H:%M,
daFormat:%l;%M%p,%e%m,%Y,
对齐:BR,
电:true,
singleClick:true,
displayArea:。siblings('。dtcDisplayArea'),
按钮:。next()
});
});
< / script>< asp:Content runat =serverID =BodyContentContentPlaceHolderID =MainContent>
< asp:TextBox ID =TextBox1runat =serverReadOnly =true>< / asp:TextBox>
< img src =calender.png/>
< asp:Button ID =btnSaverunat =serverText =Save/>
< / asp:Content>
("#<%=TextBox1.ClientID %>").dynDateTime({ showsTime: true, ifFormat: "%Y/%m/%d %H:%M", daFormat: "%l;%M %p, %e %m, %Y", align: "BR", electric: true, singleClick: true, displayArea: ".siblings('.dtcDisplayArea')", button: ".next()" }); }); </script><asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent"> <asp:TextBox ID="TextBox1" runat="server" ReadOnly = "true"></asp:TextBox> <img src="calender.png" /> <asp:Button ID="btnSave" runat="server" Text="Save" /> </asp:Content>
为什么不问问写它的人:底部有一个评论框与他沟通的页面。如果不出意外,他会比其他任何人更了解它......
Why not ask the guy who wrote it: there is a "comments" box at the bottom of the page for communicating with him. If nothing else, he will know more about it than anyone else...
这篇关于日期和时间选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文