Bonjour,
je cherche comment garder la valeur d'un datepicker lorsque je clique sur le button "Rechercher" :
Datepicker :
<?= $this->escape($this->translate("Du")); ?>: <input maxlength="15" type="text" name="IdDateDeb" id="IdDateDeb" value="<?php echo $this->escape(($this->datedeb)) ?>" onchange="Recherche_Date_Change('0', true);"/>
Bouton rechercher :
<input type="button" onclick="DoPost(0);" value="<?= $this->escape($this->translate("Rechercher")); ?>" />
Function du bouton rechercher :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| function DoPost(Reinit) {
if (Reinit == 0) {
// if ((document.getElementById('IdSearchInput').value == 0) && isNaN(document.getElementById('IdSearchText').value)) {
// alert('<?php // echo $this->translate("Veuillez saisir un Id de type entier num�rique.") ?>');
// return false;
// }
if (Validation_Date('IdDateDeb', '<?= $this->translate("de debut") ?>') == false) {
return false;
}
if (Validation_Date('IdDateFin', '<?= $this->translate("de fin") ?>') == false) {
return false;
}
if (Validation_Date_Interval() == false) {
return false;
}
}
document.MyForm.action = '<?= $this->url(array('controller' => 'Cap', 'action' => 'listcap'), false, true); ?>/reinit/' + Reinit;
document.MyForm.submit();
} |
merci
Partager