Adf Javascript code to complete an input date field

Hey guys,
I have an adf input date field
<af:inputDate value="#{MyBean.date}">
<af:clientListener method="onEnterDate" type="keyPress"/>
</af:inputDate>
I want to implement a javascript function that completes the date field, means: when the user enters 10 in the field and presses the ENTER key on the keyboard, I want to complete the date with the current system time, like this (10/11/2011), so how can I do this...
Thanks in advance..
AccadSoft

You could write a [url http://myfaces.apache.org/trinidad/devguide/clientValidation.html]client-side converter to do this.
John

Similar Messages

  • Urgent, Please help !!! Input Date field in Mysql database using JSP

    Hi All,
    Please help me ! I am trying to store a date field in MySql databaseusing JSP on Tomcat Server.I am gettting the following error.
    I am taking the String Input and then trying to convert it into date type
    inorder to store it into date field in a database.
    I am using the following code :
    <%
    try{
    String dt=request.getParameter("avldt");
    SimpleDateFormat adt= new SimpleDateFormat("dd-MM-yyyy");
    Date sqlToday = new java.sql.Date(adt.parse(dt).getTime());
    catch(ParseException e){
         e.printStackTrace();
    %>
    But I am getting the following error message :
    Class jsp.myjsp.SimpleDateFormat not found.
    Please help me !!!.It's very urgent.
    Thanks,
    Savdeep

    programming is more then copy pasting, it actually is usefull to think about what you are doing. First you declare that you date is format dd-MM-yyyy, then you want to parse a date in format dd/MM/yyyy and behold Java warns you it cannot parse the one into the second ! Cant you solve the rest of this puzzle yourself then ?

  • Removing characters from an input data-field

    Hi.
    Is it possible to "Trim Off" characters from a Text Field data, and automatically input them into another Text field?
    Let's say I have the following code :
    *<Field name='telephonenumber'>*
    *<Display class='Text'>*
    *<Property name='title' value='Phone Number in International Format'/>*
    *<Display>*
    *</Field>*
    This code is to input the telephone number in International Format (such as :  +1 234 567 8900)
    Now, lets say that I want to create a second Data Text field for phone number; but, this time, it is for the phone number in LOCAL format.
    In other words, I want to write a code which will AUTOMATICALLY  remove the first 3 or 4 characters from the "International Number",  and input them into the "Local Number"  field.
    This would save me the trouble or writing the number a second time. My code should be able to simply Trim Off the initial "+1 234", and automatically input the remaining "*567 8900"* into the Local Number field.
    How could I accomplish this?
    Thanks

    Based on your code, it looks like you have fields called global.workgsmad (local style) and global.workgsm (international style)
    Assuming your global.workgsm format will always be '+x xxx xxx xxxx' you want to skip the first 6 characters, not 4
    The simplest way to do this is like so:
    <Field name='global.workgsmad'>
       <Expansion>
          <substr>
             <ref>global.workgsm</ref>
             <i>6</i>     <!-- Skip the country code and area code '+x xxx ' -->
             <i>8</i>   <!-- 8 characters were left for the format 'xxx xxxx' -->
          </substr>
       </Expansion>
    </Field>Alternatively, you could change the substr block to read
    <substr s='6' l='8'>
       <ref>global.workgsm</ref>
    </substr>Both formats are valid.
    If the phone number is not a fixed format, you'll have to do something more complicated.
    Jason

  • Disabled input date field

    Dear Techies,
    i am using BSP with page flow logic.
    I have a date field, my requirment is i have to mandate the usage of date field only through the calander help which is provided by the input field, it should be disabled by the keyboard entry only for dat field.
    I disabled the input field on page load by using java script, and the input field is working fine, the changed value is appearing but the changed value is not being stored in the value attribute.
    When i debug the javascript is overriding the disabled property, please help me how can this be achieved.
    Regards
    Imran.

    hye Bhavana,
      Thanks for the patience.
    My requirement is:
    i should have an input field of type date, which should not be input enabled but it should accept values from the calender help. That means user should select only date from calender, but he should not be in a position change or enter values from keyboard.
    For this i have followed this approach.
    i have my htmlb tag for input.
    <htmlb:inputField id       = "tx"
                            value    = "<%= date %>"
                            showHelp = "X"
                            type     = "date" />
    And i have javascript which will disable it at the client side. This will only disable the input from a keyboard, but when i select date from calander it appears in the input field which is as per my requirment.
    Now when i am going for any eventing, the value in the input field is initialized. This is my problem. I want the input field to retain its value.
    If i dont use the javascript and make it enabled input field, i dont have a problem in rendering the change in date.
    So please give me any solution through the approach or i dont mind any new solution.
    Hope it is clear and once again appriciate your effort in understanding.
    Awaiting your response.
    Regards
    Imran.

  • APEX4: How to create a report whose data is based on user input date fields

    Using Apex 4 I've to create a report that allows the user to input two date and shows a report between the date range.
    How can I do this?
    Thank you.

    This has nothing to do with apex 4.0. If you create a report using this query:
    SELECT *
      FROM emp
    WHERE hiredate BETWEEN NVL (TO_DATE (:p1_date_from, 'mm/dd/yyyy'), hiredate)
                        AND NVL (TO_DATE (:p1_date_to, 'mm/dd/yyyy'), hiredate)and create two date picker items with names P1_DATE_FROM and P1_DATE_TO (take care of using the right date format), your report will show all records by default and those that match after you fill in the date items.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Digital signature for the input data field

    Hello friends,
    I want  to run a HASH routine (MD5) and then an encryption algorithm (RSA 64 bytes) over a string of characters ( for the some of the input fields NOT all) to generate the output with digital seal. In essence this is the concept of digital signature.
    How can i achive this using SAP XI. Can anybody guide me...
    Thanks in Advance..
    Regards
    Venkatesh

    Hey,
    refer to this link.
    How XML Encryption can be done using web services security in SAP NetWeaver XI
    Creating certificate in XI
    How to use Digital Certificates for Signing & Encrypting Messages in XI
    regads,
    Milan

  • How to automatically run javascript code from Captivate 3?

    Howdy everyone,
    My company uses a custom webpage to display the finished SWF files generated by Captivate 3.  This page has menu buttons on the side that link to other videos that are related to the video being watched.
    We want to add a little bit of spice to the menu, and highlight the next video in the series after the current SWF has finished playing.
    Now I know that Captivate 3 will launch a Javascript code when either a button is pushed, a text box is used, or a clickbox is activated, but we are looking for a way for Captivate 3 to launch a Javascript code apart from user input.  Any suggestions?

    Hi there
    One of the options you have available when Captivate finishes playing a movie is to Execute JavaScript. Perhaps use that?
    Click Edit > Preferences...
    Cheers... Rick
    Click here for Adobe Certified Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Date field validations

    Hi,
    I am new to this technology . I have two input date fields for Start and End date. I want to do javascript validation to check the Start date should be less than End date. Please help how to do it.

    this code might help you
    <f:view>
    <af:document title="DateValidation" id="d1">
    <af:form id="f1">
    <af:panelFormLayout id="pfl1">
    <f:facet name="footer">
    <af:commandButton text="Submit" id="cb1" inlineStyle="vertical-align:middle;" immediate="true"
    partialSubmit="true" action="#{pageFlowScope.SriSampleBB.dateValidation}"/>
    </f:facet>
    <af:inputDate label="Start Date" id="id1" columns="18" partialTriggers="id2" autoSubmit="true" binding="#{pageFlowScope.SriSampleBB.startDate}">
    <af:convertDateTime pattern="ddMMMyyyy"/>
    <af:validateDateTimeRange maximum="#{pageFlowScope.SriSampleBB.endDate.value}" />
    </af:inputDate>
    <af:inputDate label="End Date" id="id2" partialTriggers="id1" columns="18" autoSubmit="true" binding="#{pageFlowScope.SriSampleBB.endDate}">
    <af:convertDateTime pattern="ddMMMyyyy"/>
    <af:validateDateTimeRange minimum="#{pageFlowScope.SriSampleBB.startDate.value}" />
    </af:inputDate>
    </af:panelFormLayout>
    </af:form>
    </af:document>
    </f:view>

  • Creating process for multiple Date fields for update or insert in APEX

    hello there,
    could someone please help me?
    i have a form on Apex based on view that is based on three tables and updating and inserting ok using trigger instead of.
    i have a problem now as in my form i have around 75 fileds (items) incuding 30 or more date fields which could be populated or left blank or update later.
    so for each date field i have two boxs; one for date, input as dd/mm/yyyy (text field) and second for time, input as 23:45. All dates will be insert or update manually by user. so as i mentioned not all date fields could be poulated at one stage.
    so i have created some process and validations and all of them work fine but i came accross if date left blank then (:) giving me problem so i have done following further process for each date field. In real table all the date fields have data type date.
    declare
    v_my_var date; -- for first date field
    str_dy VARCHAR2(10);
    dt_indx date;
    str_tm VARCHAR2(20);
    tm_indx date;
    begin
    str_dy := :p4_first_date
    str_tm := str_dy||' '||substr(:p8_first_date_hh,1,2)||':'||substr(:p8_first_date_HH,4,2);
    dt_indx := to_date(str_tm,'DD/MM/YYYY HH24:MI');
    IF str_dy is not null then
    v_my_var :=dt_indx;
    ELSE
    v_my_var := NULL;
    END IF;
    update table 1 set my_date = v_my_var where d_id= :p4_d_id;
    end;
    above code work fine but one date field of course therefore i have to do same code for each date field with changes and initialise variable again and again for each field.
    so i like to ask is there any easy way that is more professional. i was thinking about the procedure and using collection or similar but honestly not much experience on that so could some one please help me?
    I will be very thankful.
    KRgds

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • How do I apply filters or limit the rows on my report using a Date field in SQL report builder 3.0?

    I have a status of completed and a date field in the dataset. The date field is either empty or contains a date. All 2015 dates are holding dates.
    So how can I limit the report to only pull completed status with an empty date or a holding date?
    I have not been able to set an OR option on a date field filter and if I add two filters on the date column one for empty one for > 12/31/2014 then it treats it as an "and" and pulls nothing from the list I have in sharepoint.
    any help will be appreciated.

    Hi MB,
    In Reporting Services, the relationship of  filters is “And”, and there is no option to change the relationship from “And” to “Or”. While we can use “or” operator within the expression to create one filter to integrated all filters to work around this
    issue.
    We can add a filter as follows in the dataset to limit the rows in your report:
    Expression: =Fields!date.Value is nothing or Fields!date.Value>"12/31/2014"    Type: Boolean
    Operator: =
    Value: true
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Date field in Web Dynpro ABAP

    Hi All,
    I want to implement the Input Date Field on my WebdynPro Application in the same way as it is availble at "SCN - Contribution Points / filter criteria" .
    I want to give the user the option to change the year , past or future easily.
    I have tried to call that date UI Element , but unable to do so.
    Please help me which UI Element to use as am new in WebDynPro ABAP...
    Thanks and Regards
    Hemachandran

    hello,
    One way of doing is  -  declare two attributes(DATE_LOW and DATE HIGH ) in the context node of type DATS.Place two input feilds in the view INPUT1 and INPUT2 , bind the two attributes to the two input feilds.
    The other way is use  OVS ( object value selector ) Search Help.
    Regards,
    Naga

  • Hash is printed in date field in excel output.

    Hello,
    I am developing a report in abap. Report output is exported to excel by using OLE code technique.
    The one date field 'posting date '  is  in the system has value i.e 27.12.2009    and i want it to be as 27/12/2009.
    i have concatenated the internal table date field into another field ' text ' of type c seperated by '/'.
    as follows :
    concatenate itab-budat6(2) itab-budat4(2) itab-budat(4) into itab-text separated by '/'.
    all dates values  are coming right,
    except dates which starts with 01.12.2009 to 09/12/2009 are showing hash(###) character and when excel column is extended then it shows
    date but in the format 12/01/2009.
    how to solve this.

    that is because 1 tab = 8 char..
    add a single quote ' to the beginning... it will be displayed as u wish....

  • Strange behaviour of data field in Monthly Invoice.

    Dear all,
    I need to create new layout  for monthly invoice using Print Layout Designer. I need to add the closing date procedure code, so I create new data field refering to the Closing Date Procedure file. This first data field shows many files. But when I want to add another new data field, this second data field only shows the Administration and Closing Date Procedure file. I need to add field from other file, but it does not appear. 
    If I delete the second data field, I can find the file I need in the first data field (the one supposed to be fill with closing date procedure code).
    Is there any idea how to get other files in the second data field ?
    By the way, I am using SBO version 2004.2b for Japanese user, and  monthly invoice is an important function in Japan.
    Thank you very much,
    Emiliana

    Thank you, Adele.
    Do you also know how to display list of the variables used in the monthly invoice layout ?
    Thanks again.
    Emiliana

  • IOS7 Safari error Code: "invalid Input Data. No javascript allow." On payment by Credit cards. Pls help

    Its Not possible to make any payment by Credit Card. After filling in the Data Form and continuing to finish the payment an error window appears Witz the Text " invalid Input Data. No javascript allow..."  Orher Browsers are working well.
    How can i fix this Problem

    Its Not possible to make any payment by Credit Card. After filling in the Data Form and continuing to finish the payment an error window appears Witz the Text " invalid Input Data. No javascript allow..."  Orher Browsers are working well.
    How can i fix this Problem

  • Upgrading to osx 10.6.8 fails. I see errors in the /var/log/install.log of "An unexpected error occurred while moving files to the final destination." Underlying Error=(Error Domain=NSPOSIXErrorDomain Code=5 "The operation couldn't be completed. Input/out

    upgrading to osx 10.6.8 fails. I see errors in the /var/log/install.log of "An unexpected error occurred while moving files to the final destination." Underlying Error=(Error Domain=NSPOSIXErrorDomain Code=5 "The operation couldn’t be completed. Input/out. Any thoughts on what is causing these errors and the upgrade failure?
    Thanks

    I have no idea what the specific error code means but input/output errors can sometimes mean a disk is failing. Make a couple of backups of all important data before doing anything else.
    Verify your startup disk using the First Aid tab in Disk Utility. If the disk needs repair boot from your Leopard DVD and repair your disk from Disk Utility under Utilities on the screen after you choose your language. Repeat the repair process until Disk Utility reports all is well.
    If Disk Utility doesn't find any errors you might want to try a new download of the update and keep a sharp eye on your HD for anything else that might indicate all is not well. Take special care to back up important data.
    If Disk Utility finds errors it would probably be a good idea to pay a visit to the Apple Store to have them check out your hard drive even if Disk Utility is able to repair the errors.

Maybe you are looking for

  • Using Airport Express to play music while surfing the web via netgear

    Can I play music over my airport express (airtunes), while simultaneosly surfing via a different wireless router. As it stands I have been unable to do this, because I have to set my wireless connection to one or the other. When I link up to my NETGE

  • Jsp and error 500

    Hi all, I have a problem with my jsp, when i try to load my jsp i 've got an error 500 like this : Error: 500 Location: /kimdog/jsp/liste_diff.jsp Erreur Interne de Servlet: org.apache.jasper.compiler.ParseException: C:\jakarta-tomcat\kimdog\jsp\list

  • Freezing when using free transform and more

    I'm on a 12 core Westmere PM w/20g RAM running 10.6.8. with a standard Mac scrollwheel mouse. I have a Wacom tablet attached but it hasn't been used in weeks. In the past week, I have encountered two mouse related freezing episodes that I cannot dupl

  • Hyperion Integration Server

    Will some one help me in understanding the HIS architecture?1.Firstly, how are the objects in HIS differet from Essbase Objects?2.Is Essbase server required even when you have Essbase integration server.If so, why is that needed when the essbase outl

  • Reading a file line by line and executing the code

    I need to read a file line by line and execute them simultaneously. I use BufferedReader for reading , but for executing i tried a lot , but could not find a solution. Kindly help and try to brief me.