我正在使用datepicker和bootstrap验证,手动工作,但是当我们选择datepicker不工作验证时 [英] I am using datepicker and bootstrap validation, , manually working but when we select datepicker not working validations

查看:109
本文介绍了我正在使用datepicker和bootstrap验证,手动工作,但是当我们选择datepicker不工作验证时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助我

我的邮件ID sbramhaji@gmail.com



我尝试了什么:



<! - DatePicker - >

< script type =text / javascript>

$(document).ready(function(){

$(#txtBOD)。datepicker({});

});

< / script>



<! - Bootstrap验证 - >

< script type = text / javascript>

$(document).ready(function(){

$('#form1')。bootstrapValidator({

feedbackIcons:{

有效:'glyphicon glyphicon-ok',

无效:'glyphicon glyphicon-remove',

验证: 'glyphicon glyphicon-refresh'

},

字段:{

txtBOD:{

验证器:{

相同:{

notEmpty:{

留言:'需要的日期'

}

}

}

}

}

});

});



< / script>

<! - ASP.NET --->

help me
my Mail Id sbramhaji@gmail.com

What I have tried:

<!--DatePicker-->
<script type="text/javascript">
$(document).ready(function () {
$("#txtBOD").datepicker({ });
});
</script>

<!--Bootstrap validation -->
<script type="text/javascript">
$(document).ready(function () {
$('#form1').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
txtBOD: {
validators:{
identical:{
notEmpty:{
message: 'The date is required'
}
}
}
}
}
});
});

</script>
<!-- ASP.NET --->



< asp:TextBox ID =txtBODrunat =server>




< asp:按钮ID =btnSubmitrunat =serverText =Submit/>


<asp:TextBox ID="txtBOD" runat="server" >


<asp:Button ID="btnSubmit" runat="server" Text="Submit" />

推荐答案

(文档)。 ready(function(){
(document).ready(function () {


(#txtBOD)。datepicker({});

});

< / script>



< ! - Bootstrap验证 - >

< script type =text / javascript>
("#txtBOD").datepicker({ });
});
</script>

<!--Bootstrap validation -->
<script type="text/javascript">


(document).ready( function(){
(document).ready(function () {


这篇关于我正在使用datepicker和bootstrap验证,手动工作,但是当我们选择datepicker不工作验证时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆