[rich:calendar] affichage de la date courante
Bonjour,
Je voudrais affiché la date courante dans ma page xhtml en utilisant rich:calendar sans la sélection de today, c a d j'obtient automatiquement la date courante dans le champ de saisie de rich:calendar
Sinon, comment faire avec javascript pour afficher la date.
j'ai essayé avec ce code sans résultat (l'affichage ne se produit pas :( )
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="fr" />
<link rel="STYLESHEET" type="text/css" href="${facesContext.externalContext.requestContextPath}/monstyle.css"/>
<script language="JavaScript">
function date()
{
Today = new Date;
Jour = Today.getDate();
Mois = (Today.getMonth())+1;
Annee = Today.getFullYear();
Message = "Nous sommes le : " + Jour + "/" + Mois + "/" + Annee;
return Message;
}
</script>
</head>
<body>
<script type="text/javascript">
document.write(date());
</script>
</body>
</html> |
Merci de m'aider