Jquery Datepicker在更新面板中不起作用 [英] Jquery Datepicker is not working inside update panel

查看:77
本文介绍了Jquery Datepicker在更新面板中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里我给出了我在更新面板中使用的代码。但是我面临的错误就像

对象没有方法'datepicker'



here i've given my code which i'm using inside update panel. but i'm facing error like
"Object Has no method 'datepicker'"

jQuery(function ($) {
           $("#<%= txtfrmdate.ClientID%>").datepicker({
               changeMonth: true,
               changeYear: true,
               showWeek: true,
               gotoCurrent: true,
               yearRange: '-70:+10',
               constrainInput: false
           });

推荐答案

){


#<% = txtfrmdate.ClientID%>)。datepicker({
changeMonth: true
changeYear: true
showWeek: true
gotoCurrent: true
yearRange :' - 70:+10'
constrainInput: false
});
("#<%= txtfrmdate.ClientID%>").datepicker({ changeMonth: true, changeYear: true, showWeek: true, gotoCurrent: true, yearRange: '-70:+10', constrainInput: false });


你好,



尝试在DatePicker代码后添加这一行:
Hello there,

Try adding this line after your DatePicker code:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest

它将在ajax回发后恢复你的脚本。

我稍微修改了你的代码实现解决方案:

It'll restore your script after ajax postback.
I have modified your code slightly to achieve the solution:

jQuery(function (


这篇关于Jquery Datepicker在更新面板中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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