Skip to main content

Search and Top Navigation

#8065 closed bug (notabug)

Opened January 27, 2012 08:04PM UTC

Closed February 11, 2012 07:59AM UTC

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.

Attachments (0)
Change History (2)

Changed January 27, 2012 08:14PM UTC by scottgonzalez comment:1

owner: → pradeeph
status: newpending

Please provide a reduced test case showing the problem.

Changed February 11, 2012 07:59AM UTC by trac-o-bot comment:2

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!