Download Buy Now (tomghfeng@hotmail.com)
How to use the Java Applet: (Can be used in all sorts of Browser)
1. The applet was packed into DatePicker.jar . and its name is "JDatePicker.class". The applet provided a output parameter: outDate. you can get it by javascript.
2. The applet need 7 parameters:
inYear, inMonth, inDay, inColorBackground, inColorButtonPress,
inColorButtonNoPress, inColorButtonInvalid.
inYear: integer input scope 1900 ---- 2100
inMonth: integer input scope 1 ---- 12
inDay:
integer input scope 1---31
If the
three parameters was be input error or the date is error. applet will
change it be suit date.
You can
select to not input the parameters. and the applet can set the inYear, inMonth,
inDay to current Date.
Parameter
inColorBackground, inColorButtonPress, inColorButtonNoPress,
inColorButtonInvalid should be input the decode of Color
like"#00ff00". if you don't input color , applet would use the default
color. if input error , applet would use the default color, too.
Sample:
There is the code of the sample HTML:
<html>
<script language=javascript>
<!--
function getDate(){
window.alert(document.DatePicker.outDate);
}
//-->
</script>
<body>
<applet code="JDatePicker.class"
codebase="./"
archive="DatePicker.jar"
height="280"
width="270"
name="DatePicker"
MAYSCRIPT>
<param name="inMonth" value="1">
<param name="inYear" value="2001">
<param name="inDay" value="1">
<param name="inColorBackground" value="#00ff00">
<param name="inColorButtonInvalid" value="#888800">
<param name="inColorButtonNoPress" value="#ff00ff">
<param name="inColorButtonPress" value="#fff444">
Sorry, your Webbrowser might not support Java Applet, please check the
setting.
</applet>
</p>
<p><input type="button"
value="Get Date"
name="B3"
onClick="getDate()"></p>
</body>
</html>
Gao Hua Feng (tomghfeng@hotmail.com)