Validate Date Range in inputDate component

Hi
I am using JDev 11.1.1.2.0
I have an inputDate component which on click i need to give dates from today to future dates not passed dates.
So i have included 'validate date time range' component in the inputDate component and in the minimum property i have declared 'adf.currentDate' using expression builder and set the maximum as Jan 31,2099.
But when i execute my application i am able to select passed dates using the inputDate component, please help how can i check the date using a validator in inputDate component.
Thanks
Sudeep

ya i had tried with that property too....
i have declared minValue as adf.currentDate and on that it changes the value of maxValue to current date in Jan 3,2012
i have convertDatetime component in my inputDate to display the selected date in certain format.
It gives error as the format doesnot matches with the convertDatetime and inputDate component.
How can i use the minValue and maxValue of inputDate component?
the component:-
<af:inputDate
label="Planned Termination Date"
id="id2"
value="#{modifyuser.pterminationdate}"
valueChangeListener="#{modifyuserfields.plannedTermDate}"
minValue="adf.currentDate" maxValue="2099-12-31">
<af:convertDateTime pattern="dd-MMM-yyyy"/>
</af:inputDate>

Similar Messages

  • Validate date range overlapping

    Hello all. I am trying to write a code which checks if the date does not overlap. For example, in my form I have id, from_date (mm/dd/yyyy), to_date (mm/dd/yyyy).. what i am trying to do is, the dates must not ovelap for particular id..
    Sample:
    id | from_date | to_date
    1 | 01/01/2012 | 01/31/2012
    1 | 04/01/2012 | 04/30/2012 --> this must be allowed
    2 | 01/15/2012 | 01/15/2012 --> this must also be allowed as id differs
    1 | 01/15/2012 | 01/15/2012 --> this must not be allowed because for id=1, 15th Jan is overalapping with the 1st row's date range (1st Jan to 31st Jan).
    PS : I dont want to use DB trigger, but rather write a code in Backing bean
    (I will let you know what code i tried so far, if needed)
    Edited by: 925715 on Apr 5, 2012 3:36 AM

    Assalaam Alaikum Jabr. thankss for the reply. For some reason it doesn't seem to work. I tried to create a validation method, at Entity level and also at Attribute level in Entity class of detail table. it is committing all the dates. Any ways, i will check again, if I am missing something here. And, must the validator be created at entity or attribute level??
    Edited by: 925715 on Apr 7, 2012 4:32 PM

  • Validate Date Range - Javascript

    Hi Gang,
    This is close to a repost... but more of a followup to a
    thread that has
    already moved down everyones list.
    I have a pretty simple form validation routine I need to
    implement, but I
    don't know the Javascript syntax well enough to work it out
    (my background
    is VBscript, but this needs to be client side). I received
    some good URL's
    to check out some free scripts.. but unfortunately, I don't
    know javascript
    well enough to hack them up correctly.
    If someone can help out with a bit of code, it would be a
    huge help.
    What I need to do is validate a numeric range as well as not
    leaving the
    field blank.
    For example what is entered must be a number between 1900 and
    2006.
    Here is what I am using for the basic required function:
    The name of the form is "ThisForm_Right", and the field name
    is "DOB_Year"
    (to explain the piece in the code below)
    if (ThisForm_Right.DOB_Year.value=="")
    alert ("Please enter the YEAR of your DOB.");
    ThisForm_Right.DOB_Year.focus();
    return false;
    Can some kind sole help with a modified version to also check
    for an entered
    number range?
    I suspect some sort of "And" statement, Like
    If
    ThisForm_Right.DOB_Year.Value==""
    AND
    Year.Value NOT between (1900 and 2006)
    alert ("Please enter the YEAR of your DOB between 1900 and
    2006.");
    ThisForm_Right.DOB_Year.focus();
    return false;
    I just don't know the real syntax :>
    Thanks
    -D

    >thanks you so much for the code, I'll test it out and
    reply with >the
    >results.
    Shouldn't that be "Thanks so much for the Cod"?
    "Dave Bar" <[email protected]> wrote in message
    news:e28c7t$hk1$[email protected]..
    > ahh yes, you are right..
    > I should have said OR instead of AND.
    > If Field is blank OR range is not between 1900 &
    2006. Thanks for catching
    > and pointing that out.
    >
    > thanks you so much for the code, I'll test it out and
    reply with the
    > results.
    > Thanks
    > -Dave
    >
    >
    >
    >
    > "Lionstone" <[email protected]> wrote
    in message
    > news:e28b1a$fu5$[email protected]..
    >> That's probably because you asked for a fish to help
    you out
    >>
    >>> Can some kind sole help with a modified version
    to also check for an
    >>> entered
    >>> number range?
    >>
    >> and fish can't type.
    >>
    >> You're off on the logic though, since something is
    not likely to be both
    >> blank and outside a certain number range. If it's
    blank or outside the
    >> range, either condition is sufficient for an error,
    right?
    >> You also want to make sure that no letters, etc, are
    entered, because
    >> that will mess up your comparisons to the other
    numbers. Keeping in mind
    >> that javascript validation can be defeated by
    sneezing and you'll need to
    >> re-validate on the server, this will be closer to
    right (not tested).
    >>
    >> var ThisYear = ThisForm_Right.DOB_Year.value;
    >> ThisYear = ThisYear.replace(/[^/d]/g,"");
    >> if(ThisYear.length == 0)
    >> {
    >> alert("Please enter the year of your DOB.");
    >> ThisForm_Right.DOB_Year.focus();
    >> return false;
    >> }
    >> else
    >> {
    >> ThisYear = parseInt(ThisYear);
    >> if((ThisYear < 1900) || (ThisYear > 2006))
    >> {
    >> alert ("The year of your DOB must be between 1900
    and 2006.");
    >> ThisForm_Right.DOB_Year.focus();
    >> return false;
    >> }
    >> }
    >>
    >>
    >
    >

  • Date format on inputDate component without slashes

    Hello
    Is there a way to let user inputdate 12142012 rather 12/14/2012 i.e. without separator?
    Vik

    use af:covertdatetime, with pattern without slashes
    <af:inputdate .... >
    <af:convertDateTime pattern="yyyyMMdd"/>
    </af:inputDate>

  • Setting the inputdate component on user's time and date in JDeveloper 11g.

    Can somebody help me non this? I was wondering on how will I get the user's time and date as the default time and date for my inputdate component because it always shows the server's date and time on where my application is placed.

    This is what I did:
    <afh:head title="EvCore Suppression"
    <afh:script text="function dateTime()
    var d = new Date();
    var t_date = d.getDate(); // Returns the day of the month
    var t_mon = d.getMonth(); // Returns the month as a digit
    var t_year = d.getFullYear(); // Returns 4 digit year
    var t_hour = d.getHours(); // Returns hours
    var t_min = d.getMinutes(); // Returns minutes
    var t_sec = d.getSeconds(); // Returns seocnds
    }" </afh:script>
    </afh:head>
    but there's an erorr near <afh:script, it says that "Using HTML script tag can result in subtle/hard to diagnose bugs, trh;script should be used instead. Recommended attriibute 'type' is missing."
    I tried to change my code based on the recommendation but it still generate an error on the same place and the same recommendation.

  • Date range using "Date Field" from basic component

    Hello Everyone,
    I have been trying to create date range option available on the dashboard based on 2 Date Filed component.
    Backend for this Dashboard is BW with using BEx query. I have a info object (Z_Date)
    Now I want to have 2 date box using Date Field component 1. Start Date 2. End Date.
    I have tried following
    1. Start Date - on Select
    DS_1.setFilter("Z_Date", {"low":StartDate.getDate()});
    2. End Date - on Select
    DS_1.setFilter("Z_Date", {"High":EndDate.getDate()});
    both the scripts do not have any problem but it doest work as it is suppose to be.
    I have also tried based on following How to write script for DATE Range
    But no luck so far.
    Please share if any one have achieved date range working as mentioned.
    Thanks,
    Rajan

    Hi,
    Set Default Date in Both Date Prompts initially .
    1. Start Date - on Select
    var startDate = StartDate.getDate();
    var endDate = EndDate.getDate();
    var varRange = startDate + " - " + endDate;
    DS_1.setFilterExt("Z_SDPCD", varRange);
    2. End Date - on Select 
    var startDate = StartDate.getDate();
    var endDate = EndDate.getDate();
    var varRange = startDate + " - " + endDate;
    DS_1.setFilterExt("Z_SDPCD", varRange);
    Or
    Select Dates First Then Provide a Button (Done) .
    And write code On Click Event of that Button
    var startDate = StartDate.getDate();
    var endDate = EndDate.getDate();
    var varRange = startDate + " - " + endDate;
    DS_1.setFilterExt("Z_SDPCD", varRange);

  • Creation of internal table dynamically based on the Date Range entered

    Hi SAPgurus,
    I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically, this part i have completed but the only issue I am facing is to populate the sales data into that fields.
    Right now my program is displaying the ALV like this.
    Ex:
    <b>CSR    District   06/2006  07/2006  08/2006  totals</b>      
    Shiva      New York                             10.00
    Shiva      new york                             30.00
    Shiva      new york                             40.00
    but it should display like this
    <b>CSR    District 06/2006 07/2006 08/2006 totals</b>
    Shiva  New York  10.00   30.00 40.00
    80.00                 
    Please help me in this scenario, how to acheive like this..
    Thanks & Regards,
    Sivaram Kandula

    Hi Sivaram,
                 I also got the same requirement . i saw rich and your code whatever you have uploaded.i have created dynamic internal table but i am facing the issue to populating the data to my dynamic internal table.
    Sivaram, can you please explain your code after this.
    *<dyn_table>
    *tab_item.
      LOOP AT tab_item.
        ASSIGN COMPONENT 1 OF STRUCTURE <dyn_wa> TO <dyn_table>.
        ASSIGN COMPONENT 2 OF STRUCTURE <dyn_wa> TO <dyn_table>.
    *    <dyn_wa> = tab_item-bztxt.
    *    <dyn_wa> = tab_item-total.
    *    APPEND <dyn_wa> TO <dyn_table>.
    **    <dyn_wa> = tab_item-total.
    **    ASSIGN tab_item-bezei  TO <dyn_wa>.
    *  APPEND <dyn_table>.
      ENDLOOP.
    how you are puting the loop at tab_item. but tab_item is already commented.
    can you send me the code after that.
    i am sending some part of my code.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
       EXPORTING
         it_fieldcatalog = gt_fCAT1
       IMPORTING
         ep_table        = new_table.
    ASSIGN new_table->* TO <dyn_table>.
       create data new_line like line of <dyn_table>.
       assign new_line->* to <dyn_wa>.
    select vbeln
            fkart
            vkorg
            vtweg
            fkdat
            spart
            fksto
            from vbrk
            client specified
            into table gt_vbrk
            where mandt = sy-mandt
            and fkart in ('ZF5','ZFR')
            and vkorg = '1100'
            and vtweg = '20'
            and fkdat in s_fkdat
            and spart = '06'
            and fksto = ' '.
       if gt_vbrk[] is not initial.
      select  vbeln
              fkimg
              prsdt
              netwr
              matnr
              arktx
              werks
              mwsbp
              from vbrp
              client specified
              into table gt_vbrp
              for all entries in gt_vbrk
              where vbeln = gt_vbrk-vbeln
              and werks in s_werks
              and matnr in s_matnr.
      endif.
    select mnr ltx spras from t247
    into table it_t247
    where spras = 'E'.
    data: lv_month1 type vbrp-prsdt,
           name1(3) type c,
           s_month type string,
            s_month1 type string,
             s_month2 type string.
    *      lv_netwr1 type vbrp-netwr,
    *          lv_mwsbp1 type vbrp-mwsbp.
          loop at gt_vbrp into gs_vbrp.
            gs_final2-matnr = gs_vbrp-matnr.
            gs_final2-arktx = gs_vbrp-arktx.
            gs_final2-fkimg = gs_vbrp-fkimg.
           lv_month1 = gs_vbrp-prsdt.
            read table it_t247 into wa_t247 with key mnr = lv_month1+4(2).
            if sy-subrc eq 0.
            name1 =  wa_t247-ltx.
            endif.
             concatenate  name1
                       lv_month1(4) into s_month SEPARATED BY '_' .
             CONCATENATE S_MONTH 'QTY' INTO S_MONTH1 SEPARATED BY ''.
              CONCATENATE S_MONTH 'VALUE' INTO S_MONTH2 SEPARATED BY ''.
             gs_final2-month = s_month.
              lv_netwr1 = gs_vbrp-netwr.
            lv_mwsbp1 = gs_vbrp-mwsbp.
            gs_final2-MONTH_QTY = S_MONTH1.
            GS_FINAL2-MONTH_VAL = S_MONTH2.
            gs_final2-value = lv_netwr1 + lv_mwsbp1.
           append gs_final2 to gt_final2.
           clear: gs_final2. "lv_name2.
           endloop.
           if gt_final2[] is not initial.
             sort gt_final2 by matnr month ascending .
             loop at gt_final2 into gs_final2.
            gs_final2_01 = gs_final2.
         collect gs_final2_01 into gt_final2_01.
        endloop.
           endif.
       ENDIF..
    Regards
    Ankur

  • Date Range - CM14 and BI Publisher

    Is there a way to make a date range prompt for reports for CM14 with BI Publisher.
    I can get it to work in BI Publisher but it does not transfer to CM14.
    Any ideas?

    Hi,
    The prompt for criteria will need to be added to report's data model within BI Publisher.  After logging into the Oracle BI Publisher User Interface, do the following:
    1.- Click the Edit link for the data model that is associated with the report that you want to add the prompt to.  If you are prompted that the Default Data Source is invalid, select the correct data source from the available drop down list.
    2.- Click the Parameters link located towards the bottom left of the screen.
    3.- Click the green plus symbol to add a new, blank row.
    4.- For the Parameter Name field, enter the following: CRITERIA
    ***Note - Ensure that the Parameter Name field is populated with all capital letters***
    5.- For the Data Type, select String
    6.- For the Default Value, you will enter information about every field you would like to prompt on.  The format for this information will be: table_name.column*datatype(length)^.  This will be repeated for as many columns as you would like to be able to prompt on.  Here is an explanation of each component:
    table_name - The table or view that the field being prompted on exists in.
    column - The column name of the field being prompted on.
    * - The asterisk connects the field's database information with the field's input specifications
    datatype - The data type of the field being input.  This tells Contract Management how to handle the input. For example, if you use datetime, it will know to put a calendar picker in the Prompt for Criteria window when printing.
    length - The maximum length that a user will be able to input in the Prompt for Criteria text box.  This value will not always be required, as datetime do not allow manual entry, only picker selection.
    ^ - The carrot denotes the end of the column specification.  Any other columns could then be added after in a continuous string. You can add as many as you like.
    Example: The following would be used to be able to prompt on a Contract's To Vendor, Total Cost, and/or Document Date:
    cnmt.to_vendor*char(8)^cnmt.total_cost*int(16)^cnmt.document_date*datetime^
    7.- For the Parameter Type, select Text
    8.- Click the Save (Floppy Disk) icon in the top right to save the changes and test the report further.
    9.- Log into the Contract Management Administration page (http://server_name:port/exponline/adminlogon.jsp)
    10.- Click the Server Configuration link and then click the Import Reports & Forms button
    11.- Restart the Contract Management web server to make this new prompt available to your end users.
    Best regards,
    Matías G. Uribe

  • Using function(s) to select date range in a computation.

    Hello
    Within my ApEx report, I would like to be able to have data returned from within a date range selected by the user. Under "Compute" there are lots of "Functions" (Least, Greatest, Last_Day, etc.) but so far I have not been able to find the right syntax for date range.
    This seems so simple - any help appreciated.
    Thanks
    Paul S.

    I do not use APEX but is the BETWEEN operator available to you?
    Normally to select a date range you just write code like
    select ....
    from table_t
    where date_col between to_date(start_date,'format') and to_date(end_date,'format')
    or
    where date_col >= to_date(start_date,'format')
    and date_col < to_date(end_date,'format') + 1
    as this form eliminates worrying about the time component.
    HTH -- Mark D Powell --

  • How can I set a date range for a Date/Time Field in LiveCycle ES2?

    I need to set a specific date range for a form set up in LiveCycle ES2. Cannot see where i allows me to do that without a code entered.

    Hi,
    You can't set a start and end date for the date/time field, the best you can do is validate the range after the user has selected it.
    An alternate is to make your own date / time field, like this sample http://adobelivecycledesignercookbookbybr001.blogspot.com.au/2013/05/an-alternative-date-p icker-for.html
    Regards
    Bruce

  • How to set current/system date to af:inputDate type field

    Hi,
    I am using <af:inputDate component to take date input from user. It is not a VO atrribute field. Could you pls suggest how to set system date to it as it loads on page by default.
    Regards,
    jitu

    Could you please provide the .jsff code as well. What you have used as value="#{bindings.date.inputValue}" in below code?
    <af:inputDate value="#{bindings.date.inputValue}"
    label="Sales Date"
    required="#{bindings.date.hints.mandatory}"
    shortDesc="#{bindings.date.hints.tooltip}" id="id1"
    binding="#{bean.searchDate}">
    <f:validator binding="#{bindings.date.validator}"/>
    <af:convertDateTime pattern="#{bindings.date.format}"/>
    </af:inputDate>

  • t:inputCalendar How To Specify a Date Range?

    <-- Sorry for my english. -->
    Can anybody help me?
    I want to know how to specify a date range in the <t:inputCalendar/> component. I'm using Tomahawk/Apche implementation. So that the user cannot specify a date outside that range.
    Thanks.

    I don't think that the inputCalendar tag supports that directly. However, you could add a validator to the component.

  • Split a Date Range N days into N row, possible?

    hi all,
    i am planning to create a view for my peoplesoft custom component
    Record structure
    Employee id | Date From | Date To
    123 | 10-Aug-2010 | 13-Aug-2010
    Can it convert into a view with the following row?
    Employee | Date
    123 | 10-Aug-2010
    123 | 11-Aug-2010
    123 | 12-Aug-2010
    123 | 13-Aug-2010
    Thanks for the help

    SBH wrote:
    Try it as below
    WITH C AS
    SELECT 123 EMPID,TO_DATE('10-Aug-2010','DD-MM-YYYY') STDT,TO_DATE('13-Aug-2010','DD-MM-YYYY') ENDT
    FROM DUAL
    SELECT EMPID, DT
    FROM (SELECT EMPID, STDT+LEVEL-1 DT
    FROM C
    CONNECT BY LEVEL <= (ENDT-STDT+1)
    SQL> /
    EMPID DT
    123 10-AUG-10
    123 11-AUG-10
    123 12-AUG-10
    123 13-AUG-10
    Works ok for a single row of data, but not if there are multiples with different date ranges. For that you'd need something more along the lines of...
    SQL> ed
    Wrote file afiedt.buf
      1  WITH c AS
      2    (
      3    select 123 as empid, to_date('10-Aug-2010','DD-MM-YYYY') as stdt, to_date('13-Aug-2010','DD-MM-YYYY') as endt from dual union all
      4    select 234, to_date('17-Aug-2010','DD-MM-YYYY'), to_date('25-Aug-2010','DD-MM-YYYY') from dual
      5    )
      6  -- END OF TEST DATA
      7  select empid, stdt+x.rn-1 as dt
      8  from c, (select rownum as rn from dual connect by rownum <= (select max(endt-stdt+1) as mx_rn from c)) x
      9  where stdt+x.rn-1 <= endt
    10* order by empid, stdt+x.rn-1
    SQL> /
         EMPID DT
           123 10/08/2010 00:00:00
           123 11/08/2010 00:00:00
           123 12/08/2010 00:00:00
           123 13/08/2010 00:00:00
           234 17/08/2010 00:00:00
           234 18/08/2010 00:00:00
           234 19/08/2010 00:00:00
           234 20/08/2010 00:00:00
           234 21/08/2010 00:00:00
           234 22/08/2010 00:00:00
           234 23/08/2010 00:00:00
           234 24/08/2010 00:00:00
           234 25/08/2010 00:00:00
    13 rows selected.
    SQL>

  • Combined Date range Field

    Hi
    I want to implement a single date range field like :
    12/11/2011 - 12/15/2011
    and on click on this field wil open a calender for 3 months which is scrollable and we can directly select "to date" and "from date" .
    Is there any component in adf to implement the same.

    Hi,
    what about building a declarative component? The component is a text field with a button associated to bring up the date select fields. In teh date select field (a popup) you have two date pickers next to each other, one showing the from and one the to. Because the data components can be dynamically refreshed and modified, you can nicely disable all dates before the chosen "from" date in the "to" date field. You then bind the declarative component to the ADF attribute you want to persist the value in. The declarative component uses a managed bean to return from date - to date as a String
    Frank

  • InputDate Component issue in JDeveloper11g Preview3

    Hi All,
    We have developed an Application in JDeveloper11g Preview1 and Migrated this Application to JDeveloper11g Preview3 . During Migration we have removed the .adf folder from the application.
    The InputDate Component is not working Properly. The Problem is when ever we are changing the year of the Date component by clicking on the arrow it is not getting reflected.
    If we are changing the year manually then it is working properly.
    If we are changing the Months in the Date Component it is working properly.
    We are facing a problem with the valueChangeListener of the InputSpin Box it is not working properly. if we are deleting the value from the spin box and changing it manually then the valueChangeListener is working but if we are clicking on the arrow of the spin box then the valueChangeListener is not getting Called. May be this is the same problem of the spin box I am facing in the Date Component.
    Please help me out in solving this problem
    Thanking You,
    Madhavi.

    Hi Frank,
    Thanks for your Suggestion.
    I have done the same thing as you have suggested, but I am facing the Same Problem with the SpinBox component.
    If I am manually changing the value of the SpinBox then the valueChangeListener is getting called.
    If I am changing it with the help of the arrow buttons besides the SpinBox then the valueChangeListener is not getting called.
    This is the Code that I have written for SpinBox in JSPX page
    <af:inputNumberSpinbox label="Label 1"
    binding="#{backing_untitled1.inputNumberSpinbox1}"
    id="inputNumberSpinbox1"
    valueChangeListener="#{backing_untitled1.fireSpinBoxValueChange}"
    minimum="0" autoSubmit="true"/>
    This is the Code that I have written in the Backing Bean related to the SpinBox
    public void setInputNumberSpinbox1(RichInputNumberSpinbox inputNumberSpinbox1) {
    this.inputNumberSpinbox1 = inputNumberSpinbox1;
    System.out.println(inputNumberSpinbox1.getValue());
    public RichInputNumberSpinbox getInputNumberSpinbox1() {
    return inputNumberSpinbox1;
    public void fireSpinBoxValueChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    System.out.println("in Value change event for SpinBox");
    I think the same SpinBox is being used for the inputDate Component that is why we are facing the same problem in selecting the Year of the DateComponent.
    Thanking You,
    Madhavi.

Maybe you are looking for

  • Need help on ADF Trinidad Table

    Hi, I got one strange problem, i have one AF Query and result table, in my af query 2 fields are LOV's have created LOV followed by the below link http://andrejusb.blogspot.com/2008/11/adf-query-component-and-view-criteria.html LoV is coming fine but

  • ##BUG## Jdev/ADF/UIX/SCM

    I'm developing an UIX application with jdev 9.0.5.1, adf and SCM to versioning. And i've been lost half day to catch an problem, that i think, was a scm bug. Explaining : I've create a uix page and, drag and drop a VO from data control to create inpu

  • Is it possible to hear yourself on the mic in real time?

    i know some recording devices that do this. when you make a noise into the mic, the sound goes right into your headphones. i figure it would be useful if i could do that, but i'm not sure if i can on garageband. if i can, please let me know. thanks a

  • Problem about Sparc/solaris10 signal in multi-thread environment

    Normally if we send a signal to a process which has several threads, the main thread of this process will handle this signal. But I found in some cases an other thread (not main thread) handled signals even if main thread was alive(mostly main thread

  • EVDRE Input Schedule - shifting of cells/formulas

    Hi everybody, I am using BPC version 5.1. I do have a problem with an EVDRE Input Schedule. It is a single EVDRE report which is nested with a product and an account dimension. Underneath the Data Input Range, I have written additional information an