my97Date如何多选日期且无重复日期
最终的效果是:
首先引用my97Date的js WdatePicker.js
html代码
<textarea cols="" name="txtNoUseDate" id="txtNoUseDate" rows="3" style="width: 88%; word-wrap: break-word; outline: none; resize: none; margin: 2px 0px;" readonly="readonly"></textarea> <img id="my97DateIcon" src="../Scripts/My97DatePicker/skin/datePicker.gif" style="vertical-align: middle; cursor: pointer; margin-top: -40px;"> <input id="yyTime2" type="hidden">
js代码
var selectDays = new Array(); $("#my97DateIcon").bind("click", function () { WdatePicker({ skin: 'ext', el: 'yyTime2', onpicked: function () { if (!!!$("#txtNoUseDate").val()) { $("#txtNoUseDate").val(this.value); } else { var str = $("#txtNoUseDate").val(); if (str.search(this.value) != -1) { } else { $("#txtNoUseDate").val($("#txtNoUseDate").val() + "," + this.value); } } selectDays.push(this.value); }, dateFmt: 'yyyy-MM-dd', minDate: '%y-%M-{%d+1}', onclearing: function () { $("#txtNoUseDate").val(""); }, isShowToday: false }); });
(本人微信号:Liberty-bcy)如果,你正在埋怨命运不眷顾,那请记住:命,是失败者的借口;运,是成功者的谦词。