微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

带有标准ASP.NET控件的jQuery datepicker

如何使用 jquery和ASP.NET将日期显示在单击图像按钮的文本框中?

解决方法

这是一个很好的例子,可以帮助您使用它.

http://www.codeproject.com/Articles/47474/ASP-NET-Control-from-jQuery-DatePicker-in-3-Minute

编辑1

你应该看看jQuery UI DatePicker.

ASP.NET示例

<script>
$(function() {
    $( "#<%= txtDate.ClientID %>" ).datepicker();
});
</script>

<form id="form1" runat="server">
  <div>
    <asp:TextBox ID="txtDate" runat="server" />
  </div>
</form>

编辑2

如果要显示按钮
通过这个linke
How I can use JQuery Datepicker with a Icon and a Format in ASP.NET

这建议你使用喜欢

$(".txtVon").datepicker({
        showOn: "button",buttonImage: "images/calendar.gif",buttonImageOnly: true
        });

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐