Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

formatting sysdate in java

bigcrayJul 12 2010 — edited Jul 19 2010
I'm trying grey out fields if a effective date is passed the sysdate. I don't want the users to be able to modify any field on the record except for the terminiation date.

I'm using a java script in the page HTML Header that i found.

</script>
<script type="text/javascript">
function disFormItems(){
var lReturn = $v('P2_EFFECTIVEDATE')
var lsysdate = $v('sysdate')
var lTest = (lReturn < lsysdate)?true:false;
$x_disableItem('P2_RESOURCE_NAME',lTest)
$x_disableItem('P2_EFFECTIVEDATE',lTest)
$x_disableItem('P2_EMS_EQUIPMENT_NAME',lTest);
}
</script>

so far i can make this grey out all the records or not grey out any of the records. I believe its because my date fields are in two different formats. So i guess i have two questions really how can i tell what format apex is using for P2_EFFECTIVEDATE and SYSDATE and how can i get them into the same format. Is there a better way of doing what I'm trying to do? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2010
Added on Jul 12 2010
8 comments
1,659 views