Date validation question

Hey all,
I have a form which allows the user to select a month, day, and year for an order. Each (mm/dd/yyyy) are individual menu selects.
Is there a way to validate that what they enter is greater than today's date? I might be able to do this with javascript but if there is a way to do it with jsp, that'd be great.
thanks!!!

HI,
U can use the SimpleDateFormat for the date validation in JSP or servlets.
This SimpleDateFormat gives a easy methods to date-validations.
Regards
Madhavan C

Similar Messages

  • Data Validation - a feature that Numbers really needs.

    Right now, the newly purchased Numbers app for iPad/iPhone is little more than a crippled document viewer for me because numbers doesn't support 'data validation' (as implemented in excel).
    Its not a hard concept and likely utilized in a LOT of spreadsheets on the planet.  Not supporting such a critical feature is a problem, as it makes numbers, at least for me, rather pointless as an authoring tool since I cannot change or update data in my worksheet without likely corrupting the document's data integrity.
    Hopefully, someone at Apple is working on fixing this.
    Given that one cannot use data validation - how do I lock down a spreadsheet so I don't accidentally change cell contents?
    The fact that there is no 'undo' button on the iPhone version that I do get on the iPad (same app) makes it worse.. I'm occasionally and unintentionally dragging selections of stuff around the page really hosing up the iPhone spreadsheet.
    So I need to just remember what needs to be updated, update the excel spreadsheet when I can, then delete the iWork-iCloud doc, upload the replacement, then refresh the iPhone/iPad version.. very cumbersome and not at all 'cloud-like' or usefull.
    Apple developers.. are you paying attention?

    Yeah I know that apple likely has the same system as Microsoft in sending general support to a forum such as this. And maybe thae same stupid moron that not paying attention to the forums if their users is a food idea.
    That doesn't change the point of the issue nor that apple directs ,e here to ask said question
    Written in the iPad split soft keypad that covers up the forum post I'm typing. Joy

  • Losing Data Validation Messages when writing back to context

    ( The base for this question is the ALV grid in section 2 of this [TimeSheetMockUp|http://www.duke.edu/~michaelm/TimeCard/AnnotatedTimeSheet.jpg] )
    Users enter values in the white cells which represent the hours recorded on a given day for a certain type of time.  
    Lets say we have a z-object that supplies us with the overall grid structure, including the headers and (the shaded) summarization cells. The web dynpro ALV had been set to allow input only on the raw data cells. They are set to 4 places with one decimal.
    As the app was being developed, when we entered invalid data in a cell, such as 123456, or 1.2345 or u2018qu2019, a nice message was displayed that told the us about the issue.  This was free u2013 I guess the phase model does that for us, and we liked it.
    Well, down the road a pieceu2026 we needed to add a method to recalc all the summary values from the raw inputs. 
    METHOD wddoafteraction .
    * wizard: navigate to and get the rows data                         *
      DATA lo_nd_nd_rows TYPE REF TO if_wd_context_node.
      DATA lt_nd_rows TYPE wd_this->elements_nd_rows.
    * navigate from <CONTEXT> to <ND_ROWS> via lead selection
      lo_nd_nd_rows = wd_context->get_child_node( name = wd_this->wdctx_nd_rows ).
      lo_nd_nd_rows->get_static_attributes_table( IMPORTING table = lt_nd_rows ).
    * do the math                                                       *
      DATA lt_updated_rows TYPE wd_this->elements_nd_rows.
      CALL METHOD wd_assist->o_wc->recalc_update_and_return_wrows
        EXPORTING
          im_rows = lt_nd_rows
        IMPORTING
          ex_rows = lt_updated_rows.
    * repopulate the rows                                      *
      lo_nd_nd_rows->bind_table( new_items = lt_updated_rows set_initial_elements = abap_true ).
    Now, weu2019re losing all the nice data validation messages u2013 they do not display (the offending entries are just cleared) !!!
    After some investigation, it seems that the bind_table call is where they get lost (without that call, they appear) .
    Iu2019ve tried placing this code in a number of hook methods, but the same thing occurs.  It is currently in the viewu2019s afteraction hook.
    So, u2026 I have two questions.
    u2022     How do I get my nice messages back. ?
    u2022      Where is the right place to update my context from 
    ( Btw, downstream, our recalc outines will also want to throw messages that we will want processed after we get through the initial validation  )
    Thanksu2026
    u2026Mike

    Fixed with SAP Note 1410122 - WD ABAP ALV: Messages are not displayed

  • Is there a equivalent of "Data Validation" function in Numbers?

    Hi, I think this question have been asked before in 2009. But there's no conclusive answer. I just imported a medium complexity xlsx sheet into Numbers, "data validation have been removed data retained" message appeared. Is there a equivalent function in Numbers? Or can we construct one? The reason this is important is when using the Macs we are ok and less likely to "fat finger" the data entry. However with a iPad and especially the iPhone, we are more likely to "fat finger" the data entry and therefore a scroll wheel or drop-down list function will help.
    If anyone has a helpful answer that will be great!
    Ken
    ===

    "Data Validation" as such is not supported in Numbers.
    Numbers '09 does support two means of restricting data choices to a pre-determined list of choices:
    Pop-up menu is a cell format that provides a pop-up list of choices from which a value may be selected. Value not on the menu cannot be inserted (except by changing the cell's format, then entering the values manually).
    Slider and Stepper are two more cell formats. Both provide a mechanism for inserting numeric values, with the minimum, maximum and increment values set in the cell format inspector.
    The numeric values set by the Slider or Stepper can be used, in a separate cell, to lookup a text value from a table of possible values.
    The Numbers for iOS feature set is a subset of the one available in Numbers '09. I don't know if Pop-up menus, Sliders or Steppers are supported in the iOS version,
    Regards,
    Barry

  • Creating a trigger to enforce data validation

    I would like to create a trigger to do some basic data validation. For example, to join an honors society a student must have a gpa between 3.7 and 4.0. I want this to fire before an insert on the table NatlHonSoc, and the field name is gpa.
    Thanks!

    user8775995 wrote:
    I'm trying to learn how to use triggers and just made this example up. It always helps to state your real intent from the beginning.
    All I have is the general syntax from a book <snip>"A" book? Which book? Just any old book?
    There is no book better to start with than the official documentation.
    Learning where to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to tahiti.oracle.com. Drill down to your product and version.
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
    Spend a few minutes just getting familiar with what kind of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what kind of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are reference manuals. Just get familiar with what is there to be referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    As pointed out by Centinul, for your purpose, you should include the Application Developer's Guide as part of your "must reference" books.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Look in your alert log and find all the non-default initialization parms listed at instance startup. Then read up on each one of them in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.

  • Check data valid with Java Script

    Hi, every one,
    I made a jsp program and just to check if the data is valid before submit. My problem is even the data is invalid, it still go to next jsp page and display alert message at the same time. But I think if the data is invalid, we can't go to next jsp page. So, any one can tell me what's wrong with my program.
    Thanks in advance.
    The source code is as follows:
    <HTML><HEAD>
    <TITLE>TEST PROGRAM</TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    function validate(){
         if(document.form1.yourname.value.length < 1){
              alert("please enter your full name");
              return false;
         if(document.form1.address.value.length < 3){
              alert("please enter your address.");
              return false;
         if(document.form1.phone.value.length < 3){
              alert("please enter your phone number");
              return false;
         return true;
    </SCRIPT>
    </HEAD>
    <BODY>
    <H1>FORM EXAMPLE</H1>
    Enter the following information. When you press the Display button,
    the data you entered will be validated, then sent by e-mail.
    <form name="form1" action="a2.jsp" enctype="text/plain" onSubmit="validate();">
    <p>
    <b>Name:</b><input type="text" length="20" name="yourname">
    <p>
    <b>Address:</b>
    <input type="text" length="30" name="address">
    <p>
    <b>Phone:</b><input type="text" length="15" name="phone">
    <p>
    <input type="SUBMIT" value="Submit">
    </FORM>
    </BODY>
    </HTML>

    Hi,
    I have another question. If i have a menu as follows and I just want to check the data valid on the current page. I mean, only value=1, 2,3 is valid, value=0 is invalid. How can I do?
    <td valign="middle" width="63%"> <font face="Arial, Helvetica, sans-serif" size="2">
    <select name="type">
    <option value="0">Please Select One of The Following Reasons</option>
    <option value="1">Exchange</option>
    <option value="2">Refund</option>
    <option value="3">Wrong Product</option>
    </select>
    </font></td>
    </tr>
    Thanks.
    peter

  • Data Validation/Filtering Using SmartView

    Hi,
    I just want to know that how can i apply Data Validation/filtering in SmartView.
    For E.G if i want that Only those combination should be Shown where the Value of a Product is Always Greater than 2000.
    Please help out
    Thanks in Advance

    Well, yes it is true you can write MDX for it but that isn't what you asked is it?
    If you look at the Tech Ref
    http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?launch.html
    and search for IIF there is an example there that should point you in the right direction.
    WITH MEMBER
    [Scenario].[Revised Budget]
    AS
    'IIF (
    [Product].CurrentMember.Caffeinated,
    Budget * 1.1, Budget
    SELECT
    {[Scenario].[Budget], [Scenario].[Revised Budget]}
    ON COLUMNS,
    [Product].Levels(0).Members
    ON ROWS
    FROM Sample.Basic
    WHERE ([Measures].[Sales], [Year].[Qtr3])
    Otherwise I might post a new question asking for someone to help you optimise an MDX query.
    Steve

  • Date Validation Error

    I'm currently using the DD-MON-YYYY format for my program. The item is for a Date of Birth, and I'm using a date picker to get the information. The problem I'm running into is that If someone types a date into the box (say 2/2/2009) instead of using the date picker, it is throwing an invalid month error (I'll come back to that part in a minute). My first question is this, is there anyway to set a Date Picker item to not allow people to type into it so that they HAVE to use the selector?
    If that's not possible, then it brings up the other problem that I brought up. The invalid month error. I believe that what's causing the problem is my validation. I'm running a check to make sure that the DAte of Birth does not occur in the future. To do this, I'm running a PL/SQL Returns Boolean script. This script runs, and runs correctly, if the date picker is used to input the date, but if you type in the date using a different format, then it throws the error. The code that I'm using is this:
    DECLARE
    WHO DATE;
    HOW DATE;
    BEGIN
    HOW := SYSDATE;
    WHO := :P3_DATE_OF_BIRTH;
    IF WHO > HOW
    THEN
    RETURN FALSE;
    ELSE
    RETURN TRUE;
    END IF;
    END;
    Any help in pointing out what I'm missing in why the code isn't runnig correctly is more than greatly appreciated. Thanks.
    Josh

    Thanks for all of the input. The way I have the validations setup is that I have three just for the date field. The first checks if it is null or not, the second checks whether it is a valid date (using the option in Apex itself), and the third one checks whether it occurs in the past or not. The thing is that it is hitting the future check and giving me an invalid date error (I tried putting in gggggg as the date, and it somehow got past the valid date validation.) and threw the invalid date error on the future check. I don't know if this changes anything or not, but I'm certainly not giving up yet.

  • Data Validation EBS 12

    I am trying to considering loading data from EBS into Planning.
    From what I understand, ERPI does not have any functionality to perform validation rules on data before loading them into EPM applications. Is this correct?
    This may be a very general question, but how do I go about determining if I need data validation or not?
    And if I do need data validation, I take it FDQM is the solution?

    Ok, thanks. Any input from yourself or others here on my other question: How do I determine if I need validity? What necessitates validity? Are there situations where I do not need validity (I am assuming there are, which is why ERP Integrator does not provide that functionality)

  • Cut and Paste - Data Validation - JEditorPane

    I have an editor in development that uses JEditorPane which is supposed to accept only certain characters as its input.
    Now if I use keystroke I am able to handle the input data entered using keyboard and it seems this is not a good idea :(.
    But, for cut and paste this method does not work. So my questions are,
    1) What is a good way to do data validation for Paste operations
    2) I know that I might need to have a custom document but where do I do the validation in the custom document. I have checked using print statements and for my paste operation, it seems that the insert method in document does not get called.
    3) Is using system clipboard and checking the text before insertion a better option.
    4)What exactly happens when paste ie control C is pressed or paste from menu is clicked. I mean sequence of method calls.
    I know I have asked many questions but answers to any of them will be highly appreciated !!
    Thanks a lot for your help in advance :)

    In my application, I subclass JTextField but you should be able to change it to JEditorPane. Here is a snippet of code that you need:
    public class myTextField extends JTextField implements ClipboardOwner {
       public boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) {
          if (ks==KeyStroke.getKeyStroke(KeyEvent.VK_V,2)) {     // CTRL-V (paste text from clipboard)
             pasteText();
             return true;
          }   // there is more to my code but this will do
          return super.processKeyBinding(ks,e,condition,pressed);
       private void pasteText() {
          try {
             Transferable contents=clipboard.getContents(this);
             if (contents==null) return;
             int i=getCaretPosition();
             String line=(String)contents.getTransferData(DataFlavor.stringFlavor);
             String tmp=getText();
             int sStart=getSelectionStart();
             int sEnd=getSelectionEnd();
             if (sStart>=0) {
                setText(tmp.substring(0,sStart)+line+tmp.substring(sEnd));
                i=sStart;
             } else {
                if (i<tmp.length()) line+=tmp.substring(i);
                setText(tmp.substring(0,i)+line);
             sEnd=Math.min(i+line.length(),getText().length());
             setCaretPosition(sEnd);
             select(i,sEnd);
          } catch (Throwable t) {
             if (ExtDB!=null) ExtDB.setError("",t);
       public void lostOwnership(Clipboard cb, Transferable transferable) {
    }The above has been formatted to look pretty, the following is more suitable for cut-n-paste:
    public class myTextField extends JTextField implements ClipboardOwner {
       public boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) {
          if (ks==KeyStroke.getKeyStroke(KeyEvent.VK_V,2)) {     // CTRL-V (paste text from clipboard)
             pasteText();
             return true;
          }   // there is more to my code but this will do
          return super.processKeyBinding(ks,e,condition,pressed);
       private void pasteText() {
          try {
             Transferable contents=clipboard.getContents(this);
             if (contents==null) return;
             int i=getCaretPosition();
             String line=(String)contents.getTransferData(DataFlavor.stringFlavor);
             String tmp=getText();
             int sStart=getSelectionStart();
             int sEnd=getSelectionEnd();
             if (sStart>=0) {
                setText(tmp.substring(0,sStart)+line+tmp.substring(sEnd));
                i=sStart;
             } else {
                if (i<tmp.length()) line+=tmp.substring(i);
                setText(tmp.substring(0,i)+line);
             sEnd=Math.min(i+line.length(),getText().length());
             setCaretPosition(sEnd);
             select(i,sEnd);
          } catch (Throwable t) {
             if (ExtDB!=null) ExtDB.setError("",t);
       public void lostOwnership(Clipboard cb, Transferable transferable) {
    }This will force the paste action to trigger a call to insertString.
    ;o)
    V.V.
    PS: my preference for the use of processKeyBinding has been labled inappropriate, the proper method according to the experts in this forum is to use a combination of InputMap/ActionMap.... so, you decide what you want to do.

  • FIM portal data validation

    Hi,
     I've implemented some basic data validation in the fim portal by editing the rdcd configuration for user editing control. I've added a regex expression for post code with a value of "^[0-9a-zA-Z\s]*$"
     Most of the examples I come across regarding portal validation all refer to copying the rcdc, creating a new control and then modifying that. My way seems to work, but I wanted to know if there's a good reason why I can't modify the xml associated
    with the original rcdcs?
    Thanks
    IT Support/Everything

    You can and this is the only way to accomplish this task.
    But if you don't succeed, the easiest way is to rollback to default look - and that's why everybody's suggestion is to copy exported XML - just to have backup in case you have to roll back your changes :)
    Also, if you want to create RCDC for custom object, it is easier to copy any other XML and change it according to your needs than creating it from scratch
    Keep trying If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • ADF Date Validation

    Hi,
    What is the easiest Date validation at UI
    eg.
    DATE2 must be less than DATE1.
    I can write in Value Change Listener and raise error. However is there any simple or smarter way to achive this at Validator or using Reg Expr ?
    Thanks,
    Kiran

    Hi,
    Try using JavaScript
    http://stackoverflow.com/questions/6135433/javascript-check-end-date-is-greater-than-or-equal-to-start-date
    http://www.webdeveloper.com/forum/showthread.php?61259-compare-dates-in-Javascript-Urgent

  • The timesheet creation failed, because of problems with the project I server or with data validation

    Hi,
    One of my user is facing issue in creating new time sheet,
    "The time sheet creation failed, because of problems with the project server or with data validations".
    This issue is coming to only few members out of 10000 members.
    Note: For the same user, can able to do in other machines. only the problem in his machine. Have ran the office diagnostics, but still the problem persists.
    Is any add-on's/any settings need to update in IE. Could any one please help me on how to fix this issue?
    Many thanks in advance.

    I would check the compatibility settings in IE etc, or try another browser (chrome, safari etc.)
    Ben Howard [MVP] | web |
    blog | book

  • Excise Invoice Cancellation on Date validation only

    Hi Experts,
    i am having critical requirement from Business, which is not available in SAP Standard, So i need help from you guys...
    Excise invoice can be cancelled on the same day of system/posting date. but when the system date and posting dates are not matching it should through error..
    Example  : i created Excise invoice on 17th june,2011 this is posting date of excise invoice, if i try to cancell on 17th june , it should allow.
                        but when i try to cancell the excise invoice on 18th june (system date) , it should not allow to cancell and it say Error !!!
    i heard there will be possible through User Exit  OR Function Module OR Routins ... Please help me
    Thanks and Regards
    Madhu

    Dear Madhusudhanan,
    Following are the list of User Exits available for J1IIN
    J_1I7_USEREXIT_EXCISE_BEF_SAVE User exit after the excise header and details are written and they can changed in J1IS  , J1IIN and Automatic creation of Excise Invoice.
    J_1I7_USEREXIT_EXINV_ADDL_DATA User exit for Excise Invoice Additional Data    in J1IS and J1IG                 
    J_1I7_USEREXIT_J1I5_MATFORM    User exit for J1I5 material form changes                           
    J_1I7_USEREXIT_J1I5_VALIDATE   User exit for subsequent J1I5 data validation                      
    J_1I7_USEREXIT_J1IEX_BEF_SAVE User exit for J1IEX before the data is saved                    
    J_1I7_USEREXIT_J1IEX_CHANGE    User exit for changing data before display             
    J_1I7_USEREXIT_J1IS_BASE_VALUE User exit to Change base value in J1IS                
    I strongly believe that the first exit will serve the purpose.
    Now if you are cancelling it using J1IH, Check the following thread.
    J1IH-User Exit
    Thanks & Regards,
    Hegal K Charles

  • Date validation

    Hi ,
    I have a created an textbox with date picker as (dd-mon-yyyy) .
    Now i want to create a validation on it for the format (dd-mon-yyyy) .
    I have created a pl/sql code with type "function returning error text".
    Begin
    If :P4_END_DATE IS NOT NULL THEN
    if :P4_END_DATE <> to_date(:P4_END_DATE ,'DD-MON-YYYY') then
    return 'END DATE should be in "DD-MON-YYYY" Format';
    end if;
    END IF;
    End;
    When i type in like 20-NOV-08 it gives error as 'START DATE should be in "DD-MON-YYYY" Format',
    but when i change month like 20-11-2008 , it actually gives error
    ORA-01843: not a valid month
    Error ERR-1024 Unable to run "function body returning text" validation.

    Hello,
    You have duplicated this post, see my answer here -
    Re: Date validation in "DD-MON-YYYY" Format,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Maybe you are looking for

  • PO Version not displayed in PO List Displays (ME2L, ME2K, etc)

    I have configured PO Version Management. My PO's are working as desired with proper output. However, the PO Version Number is not displayed in my PO List Display tcodes (ME2L, ME2K, etc) nor is it available to add to the layout.  I have configured th

  • How do I display BOTH the Time AND Date in the menu bar

    When I, System Preferences > Date and Time > Clock. I choose "show date and time in menu bar". But I only get the Time and Day of week, but NOT the date. I am trying to get the display to look something like this. *12-29-07 6:34 PM* I tried a program

  • Mac Air turn tone off

    I am trying to turn off the 2 tone notification sound on my Macbook Air, can someone help me figure out how to do this other than mute?

  • Missing Aperture Files

    Hello, I upgraded to Aperture 3.4.3 yesterday (from 3.2.2), & everything was fine. Today, I noticed that I have the little traingle with the yellow exclamation point on about 6000 of my pictures. When I right click > reconnect referenced files, I get

  • Simple image component question

    I have to fix a flash file someone else made, and I need to use an image component, which I'm not familiar with. I just need a simple image that scales up, and then moves across the screen. I've got my image component, and tweened it to scale and the