Skip to Main Content

Java Development Tools

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!

Disabled future dates for date picker, but not accepting current date.

Shovik ShyamsundarApr 15 2016 — edited Apr 16 2016

I am working on JDeveloper 12.2.1.

I disabled future dates from being selected, but unfortunately the date picker component isn't allowing me to submit a current date. The current date is claimed to be after the valid range as such:

currDateNotAllowed.jpg

Here is my bean:

public class MstDmProjectsDateBean {

public MstDmProjectsDateBean() {

}

public java.util.Date getCurrentDate() {

    oracle.jbo.domain.Date cdate = new oracle.jbo.domain.Date(new java.sql.Date(new java.util.Date().getTime()));

    java.util.Date currDate = cdate.getValue();

    return currDate;

}

}

Here is the code for the af:inputDate component:

    \<af:inputDate value="#{bindings.CreationDate.inputValue}" label="#{viewcontrollerBundle.CREATION\_DATE}"

                  required="#{bindings.CreationDate.hints.mandatory}" columns="24"

                  shortDesc="#{bindings.CreationDate.hints.tooltip}" id="id1"

                  maxValue="#{pageFlowScope.MstDmProjectsDateBean.currentDate}">

      \<f:validator binding="#{bindings.CreationDate.validator}"/>

      \<af:convertDateTime pattern="#{bindings.CreationDate.format}"/>

    \</af:inputDate>

Any ideas on why this could occur?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 14 2016
Added on Apr 15 2016
6 comments
1,958 views