Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#4171 closed bug (wontfix)

Datepicker cannot set text input elements value if the input id attribute contains a period ('.')

Reported by: kamfotl Owned by:
Priority: critical Milestone:
Component: ui.datepicker Version: 1.5.3
Keywords: Cc:
Blocked by: Blocking:

Description

In ui version 1.5.3 using jQuery 1.2.6, I am getting the following error when picking a day for a datepicker on an input field which has an id attribute containing a period ('.'):

elem has no properties
var id = elem[ expando ];   // jquery-1.2.6.js (line 662)

The following code demonstrates the error:

<html>
  <head>
    <link type="text/css" href="theme/ui.all.css" rel="Stylesheet" />	
    <script type="text/javascript" src="jquery-1.2.6.js"></script>
    <script type="text/javascript" src="jquery-ui-personalized-1.5.3.js"></script>
    <script type="text/javascript" language="javascript">
      $('document').ready(function() {
        $('#a\\.b').datepicker();
        $('#c').datepicker();
      });
    </script>
  </head>
  <body>
    id="c": <input id="c" name="c" type="text"/>&nbsp;&nbsp;&nbsp;
    id="a.b" (broken): <input id="a.b" name="a.b" type="text"/>
  </body>
</html>

Replace jquery-ui with version 1.5.1, the above works correctly:

<html>
  <head>
    <link type="text/css" href="theme/ui.all.css" rel="Stylesheet" />	
    <script type="text/javascript" src="jquery-1.2.6.js"></script>
    <!-- <script type="text/javascript" src="jquery-ui-personalized-1.5.3.js"></script> -->
    <script type="text/javascript" src="jquery.ui.all-1.5.1.js"></script>
    <script type="text/javascript" language="javascript">
      $('document').ready(function() {
        $('#a\\.b').datepicker();
        $('#c').datepicker();
      });
    </script>
  </head>
  <body>
    id="c": <input id="c" name="c" type="text"/>&nbsp;&nbsp;&nbsp;
    id="a.b" (broken): <input id="a.b" name="a.b" type="text"/>
  </body>
</html>

I am seeing this error on Firefox 2, Firefox 3, and IE 6.

Kelly

Change History (2)

comment:1 Changed 11 years ago by kbwood

Resolution: wontfix
Status: newclosed

It works in 1.6.

comment:2 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.