<
script
src
=”js/WdatePicker.js”
type
=”text/javascript”></
script
>
1
、常规调用
<
input
class
=”Wdate”
type
=”text”
onClick
=”WdatePicker()”
/>
2
、图标触发
<
input
id
=”d12″
type
=”text”/>
<
img
onclick
=”WdatePicker({el:’d12′})”
src
=”js/skin/datePicker.gif”
width
=”16″
height
=”22″
align
=”absmiddle”
/>
3.
周显示简单应用
<
input
id
=”d121″
type
=”text”
onfocus
=”WdatePicker({isShowWeek:true})”/>
4
、利用
onpicked
事件把周赋值给另外的文本框
<
input
type
=”text”
class
=”Wdate”
id
=”d122″
onFocus
=”WdatePicker({isShowWeek:true,onpicked:function(){$dp.$(‘d122_1’).value=$dp.cal.getP(‘W’,’W’);$dp.$(‘d122_2’).value=$dp.cal.getP(‘W’,’WW’);}})”
/>
<
INPUT
id
=d122_1
size
=3>
<
INPUT
id
=d122_2
size
=3>
5
、操作按钮自定义
<
input
class
=”Wdate”
type
=”text”
id
=”d15″
onFocus
=”WdatePicker({isShowClear:false,readOnly:true})”/>
6
、通过
position
属性
,
自定义弹出位置
<
input
class
=”Wdate”
type
=”text”
id
=”d16″
onfocus
=”WdatePicker({position:{left:100,top:50}})”/>
7
、以星期一作为第一天
<
input
class
=”Wdate”
type
=”text”
id
=”d17″
onfocus
=”WdatePicker({firstDayOfWeek:1})”/>