---
title: "一个不错的日期控件：My97DatePicker"
author: "crazymud"
date: "2009-07-08T00:22:52Z"
tags: [".net", "CSS", "HTML", "JavaScript", "XHTML"]
categories: ["Web前端"]
slug: "my97datepicker"
draft: false
lastmod: "2009-07-08T00:22:52Z"
id: 421469
url: "https://crazymud.iteye.com/blog/421469"
---

个人觉得My97DatePicker是一个不错的日期控件，没有研究太多，日前只用到了平面显示和在input中单击的调用。

 

平面显示：

 

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>日历控件</title>
<script type='text/javascript' src='My97DatePicker/WdatePicker.js'></script>
</head>
<body>
<div id='test'>
</div>
<script>
WdatePicker({eCont:'test'})
</script>
</body>
</html>
```

 

效果如下：

 

![](/upload/picture/pic/40146/3ba536ba-5280-3f6d-991a-d762474009a0.jpg)

 

在input中单击调用：

 

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>日历控件</title>
<link href='style.css' type='text/css' rel='stylesheet'>
<script type='text/javascript' src='My97DatePicker/WdatePicker.js'></script>
</head>
<body>

<input id="d11" type="text" onClick="WdatePicker()"/>
<button id='submit'>submit</button>

</body>
</html>
```

 

效果如下：

 

![](/upload/picture/pic/40148/06d349b2-5db0-395f-9d53-08572fe5dc90.jpg)

 

[My97DatePicker](http://www.my97.net) 的官网：[http://www.my97.net](http://www.my97.net)

 

最新版本是4.6 Beta3，我测试用的是y97 DatePicker 4.5 正式版。