<table>
<tr>
<td>
<p:calendar showOn="button" value="*" />
</td>
</tr>
<tr>
<td>
<applet></applet>
</td>
</tr>
</table>
when I used primefaces and applet I occured a problem that when I click the date picker button, the popup picker is covered by applet.
Its a matter of css
just warp your applet
with a div
for example
<div id="applet_wrapper">
<applet></applet>
</div>
And play with its css display or position
for example (in your css file...):
#applet_wrapper{
display :block; //or inline-block
}
Here you need to use SimpleDateFormat by which you can be covered you date difference in java applet.
Date d1 = null; Date d2 = null;
d1 = format.parse(logindate1);
d2 = format.parse(logoutdate);
//in milliseconds
long diff = d2.getTime() - d1.getTime();
long diffSeconds = diff / 1000 % 60;
long diffMinutes = diff / (60 * 1000) % 60;
long diffHours = diff / (60 * 60 * 1000) % 24;
long diffDays = diff / (24 * 60 * 60 * 1000);
System.out.print(diffDays + " days, ");
System.out.print(diffHours + " hours, ");
System.out.print(diffMinutes + " minutes, ");
System.out.print(diffSeconds + " seconds.");
I got same problem but after some search i found date picker in applet . I hope it will help you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.