#8498 closed bug (notabug)
date picker show error with same input control with same id in different forms in one html file
Reported by: | 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>
Change History (4)
comment:1 Changed 11 years ago by
comment:2 follow-up: 3 Changed 11 years ago by
Component: | ui.core → ui.datepicker |
---|---|
Resolution: | → invalid |
Status: | new → closed |
That's not valid HTML.
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>
</head> <body>
</body> </html>