如何創建jQuery UI的日期選擇器當前的月份和日期和年份只顯示如何創建jQuery UI的日期選擇器當前的月份和日期和年份只顯示
<html>
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function()
{
$("#datepicker").datepicker({
changeMonth: false,
changeYear: false,
});
});
</script>
</head>
<body>
<div class="row">
<label for="email">Check Date:</label><br />
<input id="datepicker" class="input" name="date" type="text" value="" required/><br />
</div>
</body>
</html>
告訴我如何禁用一切,只啓用電流日期時間和年份
你是什麼意思「當前月份和日期和年份只顯示」? – Dekel
爲什麼然後能夠選擇,如果您禁用更改日期和年份的能力,並且在您的示例中,您也禁用了月份。 – Steve
我的意思是我在窗體中顯示,但我想用戶不能更改日期或月或年只在日曆當前日期顯示和其他禁用只是檢查此代碼,你會明白,我想說什麼 –