Opened 8 years ago

Closed 8 years ago

#8065 closed bug (notabug)

In IE-8 error occur as "target.offsetWidth is null or not an object" - DatePicker

Reported by: pradeeph Owned by: pradeeph
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.17
Keywords: Cc:
Blocked by: Blocking:

Description

I am using Jquery: 1.7.1 jQuery UI: 1.8.17

IN IE-8 i am getting "target.offsetWidth is null or not an object" error.

I tryed to debug and fond that in jquery-1.7.1.js at Line number 3164 look like:

if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur")
event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {

and my updated solution is

if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur")
( event.target != undefined && event.target.offsetWidth != undefined && event.target.offsetWidth != 'undefined' && event.target.offsetWidth !== 0)) && !jQuery.isWindow( elem ) ) {

Here event.target is getting undefined in IE-8

Html code to access datepicker <input type="date" value="2012-01-18" size="11" name="applicationdate" id="applicationdate" class="datepicker" required="required">

and Javascript code:

$('.datepicker').datepicker({

dateFormat : 'yy-mm-dd', changeMonth: true, changeYear: true, showButtonPanel: true, constrainInput : false

});

please correct me if i did some thing wrong. and make it available ASAP.

Change History (2)

comment:1 Changed 8 years ago by Scott González

Owner: set to pradeeph
Status: newpending

Please provide a reduced test case showing the problem.

comment:2 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.