Skip to main content

Search and Top Navigation

#8498 closed bug (notabug)

Opened August 14, 2012 04:59PM UTC

Closed August 14, 2012 08:44PM UTC

Last modified August 15, 2012 12:01PM UTC

date picker show error with same input control with same id in different forms in one html file

Reported by: dvinayaksutar@gmail.com Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.22
Keywords: Cc:
Blocked by: Blocking:
Description

date picker show error with same input control with same id in different forms in one html file

for first input it shows correct value but for second input control it updates value of first input control

sample html file

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title></title>

<script src="../jScr/jquery-min.js" type="text/javascript"></script>

<script src="../jScr/jquery-ui-min.js" type="text/javascript"></script>

<script src="../jScr/jquery-ui-timepicker-addon.js" type="text/javascript"></script>

<script type="text/javascript" language="javascript">

$(document).ready(function () {

$('.dt').datetimepicker({ dateFormat: 'dd/mm/yy', timeFormat: 'hh:mm' }).attr('size', 17); //.empty_value($.get(wSer + "/GetDate", { format: '1' }, function (data) { alert(data); $(this).val(data); }), false, '');

});

</script>

</head>

<body>

<form action="">

<input id="test" type="text" class="dt" />

</form>

<form action="">

<input id="test" type="text" class="dt" />

</form>

</body>

</html>

Attachments (0)
Change History (4)

Changed August 14, 2012 05:02PM UTC by dvinayaksutar@gmail.com comment:1

please check this code...

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title></title>

<script src="../jScr/jquery-min.js" type="text/javascript"></script>

<script src="../jScr/jquery-ui-min.js" type="text/javascript"></script>

<script src="../jScr/jquery-ui-timepicker-addon.js" type="text/javascript"></script>

<script type="text/javascript" language="javascript">

$(document).ready(function () {

$('.dt').datetimepicker({ dateFormat: 'dd/mm/yy', timeFormat: 'hh:mm' }).attr('size', 17); });

</script>

</head>

<body>

<form action="">

<input id="test" type="text" class="dt" />

</form>

<form action="">

<input id="test" type="text" class="dt" />

</form>

</body>

</html>

Changed August 14, 2012 08:44PM UTC by scottgonzalez comment:2

component: ui.coreui.datepicker
resolution: → invalid
status: newclosed

That's not valid HTML.

Changed August 15, 2012 08:12AM UTC by dvinayaksutar@gmail.com comment:3

Replying to [comment:2 scott.gonzalez]:

That's not valid HTML.

Can you please tell me why & where?

Changed August 15, 2012 12:01PM UTC by scottgonzalez comment:4

IDs must be unique. Please use a support forum for help.