1.引入JSCalendar
2.直接使用
注意:
inputField : "publisherDate", // id of the input field
ifFormat : "%Y-%m-%d", // the date format
button : "publisherDateBt" // id of the button
官方網站:
[url]http://www.dynarch.com/projects/calendar/[/url]
<!--導入calendar -->
<script type="text/javascript" src="styles/calendar/calendar.js"></script>
<script type="text/javascript" src="styles/calendar/calendar-setup.js"></script>
<script type="text/javascript" src="styles/calendar/lang/calendar-en.js"></script>
<link href="styles/calendar/calendar-win2k-cold-1.css" type="text/css" rel="stylesheet"/>
2.直接使用
<input type="text" id="cal-field-1" name="duedate" value=""/>
<button type="button" id="cal-button-1">...</button>
<script type="text/javascript">
Calendar.setup({
inputField : "cal-field-1",
ifFormat : "%Y-%m-%d",
button : "cal-button-1"});
</script>
注意:
inputField : "publisherDate", // id of the input field
ifFormat : "%Y-%m-%d", // the date format
button : "publisherDateBt" // id of the button
官方網站:
[url]http://www.dynarch.com/projects/calendar/[/url]