Bonjour,
Voila mon problème :
J'ai deux calendrier qui ne sont pas en pop-up sous un input, mais je veut récupérer la valeur sélectionné par le calendrier "1" dans l'input "DATE1" et par le calendrier "2" dans l'input "DATE2".
Voila se qu'il y a à l'origine (prévu pour un calendrier):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>jQuery Datepicker</title>
<link href="jquery.datepick.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="jquery.plugin.js"></script>
<script src="jquery.datepick.js"></script>
<script>
$(function() {
$('#popupDatepicker').datepick();
$('#inlineDatepicker').datepick({onSelect: showDate});
});
function showDate(date) {
alert('The date chosen is ' + date);
}
</script>
</head>
<body>
<h1>jQuery Datepicker</h1>
<div id="inlineDatepicker"></div>
</body>
</html>
Le code avec ma modification :
<php xmlns="http://www.w3.org/1999/xphp" xml:lang="fr">
<title>Daily Time </title>
<head>
<meta http-equiv="content-type" content="text/php; charset=ISO-8859-1" />
<link href="jquery.datepick.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="jquery.plugin.js"></script>
<script src="jquery.datepick.js"></script>
<script src="jquery-ui.multidatespicker.js"></script>
</head>
<body background="IMAGES/fond_M_CAE.jpg">
<script>
$(function()
{
$('#popupDatepicker').datepick();
$('#inlineDatepicker').datepick({onSelect: showDate});
$('#inlineDatepicker2').datepick({onSelect: showDate});
});
function showDate(date)
{
if (onclic=inlineDatepicker)
{
document.getElementById("DATE1").value =date
}
else (onclic=inlineDatepicker2)
{
document.getElementById("DATE2").value =date
}
}
</script>
<div id="inlineDatepicker"></div>
<input type="date" id="DATE1" Value='date' Size="9"></input>
<div id="inlineDatepicker2"></div>
<input type="date" id="DATE2" Value="" Size="9"></input>
</body>
</php>
Comment je peut faire pour pouvoir récupérer facilement c'est valeur ?
(Se post découle de la résolution du post suivant : Calendrier : Toujours visible sur la page)
Merci
Merci et que le café soit avec vous.
Je regarde sa.