Oamessagedatefieldbean Datefrombean = (Oamessagedatefieldbean) webbean.findchildrecursive ("PReceiptFromDate"); = datefrombean.gettext (PageContext); = pagecontext.getoanlsservices (). Stringtodate (DATEFROMSTR); Oracle.jbo.domain.Date recfromdatenew oracle.jbo.domain.Date (receiptfromdate);
Verify that the entered date cannot be greater than the last day of the current month
Oamessagedatefieldbean Datefield =(Oamessagedatefieldbean) webbean.findindexedchildrecursive ("Date"); Date valimaxdate=NewDate (); Calendar Cal=calendar.getinstance (); Cal.settime (valimaxdate); Cal.set (Calendar.day_of_month,1); Cal.roll (Calendar.day_of_month,-1); Valimaxdate=Cal.gettime (); Datefield.setmaxvalue (valimaxdate); LongMaxTime =Valimaxdate.gettime (); Datefield.setonblur ("Var dff=_getdatefieldformat (this); var vl=dff.parse (this.value); if (vl!= (void 0)) {var currtime=vl.gettime (), if (currtime> "+maxtime+") {alert (this.value+ ' cannot be greater than the last day of the month.); This.value= '; return false}}else{var msg= ' date format does not match or is empty, returns true to allow the system to verify: '; return true} ");
Required to display the day of the month and seconds, the second is always 00
String Userdateformat = pagecontext.getoanlsservices (). Getuserjavadateformat (); = Userdateformat + "hh:mm:00"; New
Datebean.setattributevalue (on_submit_validater_attr, formatter);
Set Date specified format
Oamessagetextinputbean money = (oamessagetextinputbean) webbean.findchildrecursive ("money"); if NULL { money.setrequired (this). Required_yes); = new oadecimalvalidater ("#,###,###,# #0.00;-#,###,###,# #0. xx", "#,###,###,## 0.00;-#,###,###,# #0) "); Money.setattributevalue (on_submit_validater_attr, formatter); }
Reference Links:
How to get the date from Oamessagedatefieldbean
Setting Calendar entries in OAF page
How to get the date from Oamessagedatefieldbean