标签:cti picker txt 问题 date 脚本 begin style min
<script type="text/javascript"> $(function () { $("[id$=‘txtBeginTime‘]").prop("readonly", true).datepicker({ defaultDate: "+1w", changeMonth: true, dateFormat: "yy-mm-dd", maxDate: new Date(), onClose: function (selectedDate) { $("[id$=‘txtEndTime‘]").datepicker("option", "minDate", selectedDate); } }).focus(function () { $(this).val(‘‘); }); $("[id$=‘txtEndTime‘]").prop("readonly", true).datepicker({ defaultDate: "+1w", changeMonth: true, dateFormat: "yy-mm-dd", maxDate: new Date(), onClose: function (selectedDate) { if (selectedDate != "") { $("[id$=‘txtBeginTime‘]").datepicker("option", "maxDate", selectedDate); $("[id$=‘txtEndTime‘]").val($(this).val()); } } }).focus(function () { $(this).val(‘‘); }); }); </script>
解决使用控件后,验证脚本失效的问题
$("[id$=‘txtDate‘]").prop("readonly", true).datepicker({ defaultDate: "+1w", changeMonth: true, dateFormat: "yy-mm-dd", maxDate: new Date(), onClose: function (selectedDate) { this.focus(); //解决parsley.js验证失效的问题 this.blur(); } });
标签:cti picker txt 问题 date 脚本 begin style min
原文地址:http://www.cnblogs.com/SmilePastaLi/p/7089312.html