How to set Max and Min dates for calendar value:
try
{
PreparedStatement prpdStmt1=am.getOADBTransaction().getJdbcConnection().prepareStatement("select NVL(TO_DATE (fnd_profile.VALUE ('GLOBAL_DATE'),'DD-MON-RRRR'),SYSDATE) date1 FROM DUAL");
ResultSet rs=prpdStmt1.executeQuery();
rs.next();
java.sql.Date date1 = rs.getDate("date1");
PreparedStatement prpdStmt12=am.getOADBTransaction().getJdbcConnection().prepareStatement("select NVL(TO_DATE (fnd_profile.VALUE ('GLOBAL_DATE'),'DD-MON-RRRR'),SYSDATE+60) date1 FROM DUAL");
ResultSet rs1=prpdStmt12.executeQuery();
rs1.next();
java.sql.Date date12 = rs1.getDate("date1");
OAMessageDateFieldBean dateField = (OAMessageDateFieldBean)webBean.findIndexedChildRecursive("stdate");
System.out.println("date1----"+date1);
System.out.println("date12----"+date12);
dateField.setMinValue(date1);
dateField.setMaxValue(date12);
}
catch(Exception e)
{
}
No comments:
Post a Comment