Step
1.add textbox
2.import js
3.bind textbox & datepicker
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
<script type="text/javascript">
$(function () {
$("#txt_DATE").datepicker({ dateFormat: 'yy/mm/dd' }).val();
});
</script>
</head>
<body>
<input id="txt_DATE" type="text" />
</body>
</html>
结果:
画面就会像这样,点一下txt_DATE,会跳出日历可以选日期,选完日期,值放到txt_DATE
*日期会依我们设的dateformat做显示.
aspx的control也可以
<asp:TextBox ID="txt_DATE" runat="server"></asp:TextBox>
ref
js datepicker
https://jqueryui.com/datepicker/
datepicker format
https://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format
<<: 【制造转型分享】制造业导入MES数位转型,政府补助最高 5000 万
依照昨天范例我们继续写下去 # -*- coding: utf-8 -*- from odoo im...
终於来到了最後一天,必须说这个月有种自己在作大学报告的错觉,每天看很多参考资料,英文阅读能力又提升...
最近在写的文章都是一些教学型的文章,文章内容习惯建立步骤流程,当流程一多的时候,就希望有一个快速连结...
今天人还在外面游山玩水阿阿阿阿XDDD 来介绍一个比较无关资安与WEB技术, 纯粹是Burp Sui...
filter filter() 会建立一个新的阵列,其内容为原阵列的每一个元素经由回呼函式判断後所回...