$("#popup_calendar").datepicker({
onSelect: function() {
var zn = $("#popup_calendar").val();
alert(zn);
$("#dialog_calendar").dialog("close");
}
});
<html>
<head>
<title>Зв</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script src="/jquery-ui-1.9.2.custom/js/jquery-1.8.3.min.js"></script>
<link rel="stylesheet" href="/jquery-ui-1.9.2.custom/css/ui-lightness/jquery-ui-1.9.2.custom.min.css">
<script src="/jquery-ui-1.9.2.custom/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="/jquery-ui-1.9.2.custom/js/jquery.ui.datepicker-ru.js"></script>
<script type=text/javascript>
$(document).ready(function(){
$("#popup_calendar").datepicker({
onSelect: function() {
var zn = $("#popup_calendar").val();
alert(zn);
$("#dialog_calendar").dialog("close");
}
});
$("#dialog_calendar").dialog({
autoOpen: false,
height: 450,
width: 370,
resizable: false,
modal: true,
position: ["center",70],
buttons: {
"ОК": function() {
var zn = $("#popup_calendar").val();
alert(zn);
$(this).dialog("close");
},
"Удалить": function() {
$(this).dialog("close");
},
"Отмена": function() {
$(this).dialog("close");
}
},
close: function() {
allFields.val("").removeClass("ui-state-error");
}
});
$(".nnn").click(function(){
$("#dialog_calendar").dialog("open");
});
});
</script>
</head>
<body>
<div id="dialog_calendar" title="Н">
<p class="tips"></p>
<div id="popup_calendar"></div>
</div>
<p style="height:200%;">Пролистайте в низ</p>
<p class="nnn" style="background:red;">Click</p>
<p style="height:50%;"> </p>
</body></html>