选择日期后,datepickers ontextchnaging事件未触发 [英] datepickers ontextchnaged event is not firing after selecting the date
本文介绍了选择日期后,datepickers ontextchnaging事件未触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi ,
<script type="text/javascript">
$(function () {
$("#<%=txtReviewStartDate.ClientID%>").datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function (dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, month, 1));
}
});
});
$(function () {
$("#<%=txtReviewEndDate.ClientID%>").datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function (dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, month, 1));
}
});
});
</script>
<div class="form_lft_inner" runat="server" id="div7">
<div class="TwoColumn_Form_Wrap_Lft">
Timescale
</div>
<div class="TwoColumn_Form_Wrap_Rht">
<asp:TextBox ID="txtReviewStartDate" AutoPostBack="true" OnTextChanged="txtReviewStartDate_TextChanged" runat="server" CssClass="graphinput"></asp:TextBox><img src="../../images/calander.png" style="margin: 0px 10px 0px 2px; float: left" />
<asp:TextBox ID="txtReviewEndDate" runat="server" CssClass="graphinput"></asp:TextBox><img src="../../images/calander.png" style="margin: 0px 10px 0px 2px; float: left" />
</div>
</div>
这个我的txtReviewStartDate_TextChanged事件根本没有触发..
如果我错了,请建议或纠正我
in this my txtReviewStartDate_TextChanged event is not firing at all ..
Please suggest or correct me if i am wrong in this
推荐答案
(function(){
(function () {
(#<% = txtReviewStartDate.ClientID %> )。 datepicker({
changeMonth:true,
changeYear:true,
showButtonPanel:true,
dateFormat:'MM yy',
onClose:functio n(dateText,inst){
var month =
("#<%=txtReviewStartDate.ClientID%>").datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, dateFormat: 'MM yy', onClose: function (dateText, inst) { var month =
(#ui-datepicker-div .ui-datepicker-month:selected)。val();
var year =
("#ui-datepicker-div .ui-datepicker-month :selected").val(); var year =
这篇关于选择日期后,datepickers ontextchnaging事件未触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文