---
title: "jquery datepicker 的使用"
author: "geshenyi"
date: "2010-10-21T11:25:20Z"
tags: ["jQuery"]
categories: ["编程语言"]
slug: "jquery-datepicker"
draft: false
lastmod: "2010-10-21T11:25:20Z"
id: 790288
url: "https://geshenyi.iteye.com/blog/790288"
---

http://www.jqueryui.com/demos/datepicker/#dropdown-month-year 这里显示了各种样式的日历。 可以下载对应的样式，可以看到对应样式的js调用方法。 贴一段自己常用的：仅供参考 \[code="java"] //日历效果 $(document).ready(function() { $('#datepicker1').datepicker({ changeMonth: true, changeYear: true, monthNamesShort:\['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'], dateFormat: 'yy-mm-dd', buttonImageOnly: true, yearRange: '1900:2222', clearText:'清除', closeText:'关闭', prevText:'前一月', nextText:'后一月', currentText:'今天', monthNames:\['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'] }); }); \[/code]