1.先引入jquery,再引入本插件
<script src="jquery.js"></script> <script src="jQueryNlg/jquery-solarlunar-xp1.0.js"></script>
2.调用:
<script>
$("你的input元素").solarlunar();
</script>
3.可配置项:
$("你的input元素").solarlunar({
linkage: true, //是否在选公历(农历)时,农历(公历)联动变化。
minyear: 1892, //最小年
maxyear: 2100, //最大年 本插件年份支持极值为(1892-2100)
type: "lunar", //初始显示公历还是农历。(solar公历,lunar农历)
year: 2018, //初始显示的公历年份
month: 1, //初始显示的公历月份
day: 1, //初始显示的公历日
lyear: 2017, //初始显示的农历年份
lmonth: 12, //初始显示的农历月份
lday: 15 //初始显示的农历日
});