Authored by 陶雨

抽奖活动编辑页在提交时对开始时间结束时间做判断

... ... @@ -44,6 +44,11 @@ $("#beginTimeStr,#endTimeStr").change(function() {
});
e.init();
e.on("validate", function() {
if(new Date($("#beginTimeStr").val()).getTime() >= new Date($("#endTimeStr").val()).getTime()) {
return "开始时间必须小于结束时间";
}
});
e.on("validate",function() {
var bkStyle = [];
... ...
... ... @@ -44,10 +44,10 @@
<div class="form-group">
<label class="col-sm-2 control-label">活动时间<span class="red">*</span></label>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:end:endTimeStr" id="beginTimeStr" required placeholder="活动开始时间" value="{{beginTimeStr}}" readonly>
<input type="text" class="form-control" jsaction="time" id="beginTimeStr" required placeholder="活动开始时间" value="{{beginTimeStr}}" readonly>
</div>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:start:beginTimeStr" id="endTimeStr" required placeholder="活动结束时间" value="{{endTimeStr}}" readonly >
<input type="text" class="form-control" jsaction="time" id="endTimeStr" required placeholder="活动结束时间" value="{{endTimeStr}}" readonly >
</div>
<div class="col-sm-3">
<label class="control-label" id="totalHours"></label>
... ...