<html>
<body>
<?php
include( "ooDateTime.cls.php");
?>
<form name="frmMain">
<input type="text" name="dtDateTime" size="30"><br>
<?php
$dt = new ooDateTime;
$dt->setFieldName( "document.frmMain", "dtDateTime");
$dt->setAMPM( true );
$dt->writeJS();
// once the value is returned in the dtDateTime field
// use PHP strtotime to convert it back to unix timestamp format :)
?>
Select Date:
<?=$dt->displayDay() ?>/
<?=$dt->displayMonthName() ?>/
<?=$dt->displayYear() ?>
<br>
Select Time:
<?=$dt->displayHour() ?>:
<?=$dt->displayMinute() ?>:
<?=$dt->displaySecond() ?>
<?=$dt->displayType() ?>
<br>
</form>
</body>
</html>
|