Tag: 主页面

为什么我的jQuery UI datepicker在初始页面加载时工作正常时不能用于回发?

我一直在尝试将jQuery UI Datepicker集成到我们的ASP.NET WebForms应用程序中。 应用程序使用母版页为所有页面提供通用外观,所有内容页面都构建在UpdatePanel的ContentTemplate中。 我创建了一个用户控件来包装datepicker的function,并允许在运行时为代码隐藏中的每个日期设置minDate,maxDate,validators等。 我还需要处理ASP.NET生成客户端元素ID的方式。 在过去的一周里,我一直在高低搜索,并找到了很多让它工作的技巧。 这是我现在所处位置的简化版本。 // This function enables the datepicker behavior for this textbox by its ClientID. function () { $(“#”).datepicker({ changeMonth: true, changeYear: true, showOn: ‘button’, buttonImage: “/images/calendarIcon.gif”, buttonImageOnly: true, buttonText: ”, duration: ”, onSelect: function() { } }); }; // Register the above function to execute on initial […]