I am developing an asp.net page/application. I have created a textbox that i set as a datepicker using the datepicker from jqueryui. in firefox and chrome the datepicker does not render. in IE9 the date picker renders if i ignore the error. the error is at line 644 in jquery.ui.datepicker.js.
the code where the error is thrown is here.
inst.dpDiv.zIndex($(input).zIndex()+1);
this is the message that VS displays when it catches the error
Microsoft JScript runtime error: Object doesn't support this property or method
i'm not sure what is causing the issue. I have looked for zindex issues, and the ones i'm finding are related to dialog appearing behind other elements. i don't have the happening.
Add jquery.ui.core.js
will be OK
I had this same issue and fixed it by making sure that I had the most current jQuery and jQuery UI referenced.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
.zIndex() is not a jQuery method (search the jQuery API, nothing there)
You should use the .css('z-index','100')
Also a side note:
Whenever working in ASP .NET I do not use the $ sign to access jQuery I use
inst.dpDiv.zIndex(jQuery(input).zIndex()+1);
Depending on what ASP .NET framework you are using Win Forms, MVC etc the built in MSFT Ajax can collide with jQuery.
Use this:
$.zIndex = $.fn.zIndex = function (opt) {
var def = { inc: 10, group: "*" };
$.extend(def, opt);
var zmax = 0;
$(def.group).each(function () {
var cur = parseInt($(this).css('z-index'));
zmax = cur > zmax ? cur : zmax;
});
if (!this.jquery)
return zmax;
return this.each(function () {
zmax += def.inc;
$(this).css("z-index", zmax);
});
}
I included(core files),
ui.css and ui.core.js files
It's works for me..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With