jQuery MiniUI
标题:
datapicker的onvaluechanged事项如何携带俩个参数
[打印本页]
作者:
Aisin丿Gioro
时间:
2020-11-5 11:56:06
标题:
datapicker的onvaluechanged事项如何携带俩个参数
<input id="startDate" name="startDate" class="mini-datepicker" allowInput="false"
errorMode="border" required requiredErrorText="开始日期不能为空"
onvaluechanged="onStartDateValueChanged(this,'endDate')"/>
<script>
function onStartDateValueChanged(e,moduleId) {
var startDatePicker = e;
var value = this.getValue();
var endDatePicker = mini.get("moduleId");
var endDateValue = endDatePicker.getValue();
if(endDateValue && value > endDateValue){
seesoft.alert("开始日期不能大于结束日期,请重新选择开始日期!");
startDatePicker.setValue();
}
}
</script>
复制代码
这种会报this.getValue()的错
作者:
felt
时间:
2020-11-5 12:05:17
onvaluechanged="onStartDateValueChanged(e,'endDate')"
function onStartDateValueChanged(e, moduleId) {
var startDatePicker = e.sender;
var value = e.value
var endDatePicker = mini.get(moduleId);
}
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2