Help with a date field script

Sorry if this is a repeat. I was interrupted and found that my browser had crashed when I came back so I'm not sure if the question got asked.
I need a script for a date field (mm/dd/yyyy) where the user can only fill in a date that is between 12/31/1899 and the current date (whatever the date when the form is opened). I'm getting better at writing these but I haven't been successful with this one. Any help would be greatly appreciated.
Thanks!

I have a feeling I already answered this question some time ago... Anyway, you can use this code as the field's custom validation script:
var minDate = util.scand("mm/dd/yyyy", "12/31/1899");
var maxDate = new Date();
event.rc = true;
if (event.value) {
    var d = util.scand("mm/dd/yyyy", event.value);
    if (d<minDate || d>maxDate) {
        app.alert("Error! The entered date must be between " + util.printd("mm/dd/yyyy", minDate) + " and " + util.printd("mm/dd/yyyy", maxDate));
        event.rc = false;

Similar Messages

  • Help with Updating Data Fields in Merged Document

    I'm working in InDesign CS5 v7
    I have a multipage report, all using one master page for about 80  seperate records. Each page has their own linked graphs/images.
    We  now have need to alter the source data, and while these alterations can be seen in  'Preview mode' on the Master Page, they are not carrying through  into the pages themselves. No amount of 'Update Data Source' clinking changes this,  and the 'Update Content Data Fields' remains greyed out...
    I really don't want to have to remerge the whole document, as I will loose all of the linked graphs and images.
    Can anyone help?

    You've seen the other thread, so I think you already know the answer...

  • Help with the date field!!! in opportunity

    hello friends!!!!
    I have a requirement that in opportunity tab milestone we have created date profile with 4 different date types and position them to milestone tab in opportunity header data.
    Now the issue is out these 4, 2 of them we wish to have as mandatory fields
    date type                     desciption
    ZNOH_CONTSIG          Date of signature
    ZNOH_COSTART         Contract Start Date
    Can you please help how is that possible..
    what procedure will it be behind this !!

    Hello Manuel Rodriguez 
    I have awarded you 6 points for your helpful answer as it didn´t solve my question posted here but a related issue was solved.
    I tried to use the incompletness procedure and also the badi but in both the ways you can check for a field but in my case in opportunity tab milestone
    it looks like an ALV with CRM concept it has date profiles behind that using date management in SPRO. Please have a look if possible.
    Any help would be gr8 and any ideas from people which can give me any infos about it will be great!!!!!!!!!!!
    Many thanks in Advance.
    Pankaj

  • Billing report with due date field

    Dear Friends,
    Can you please tell the logic of Billing report with due date field.
    Input.  billing document no, date range, sales organisation
    Output : billing document no, sales organisation, Amount. Due date.
    If any clarification required, Please let me know.
    Thanks in advance
    Ranjan

    Is it VF05 is suffiant for your purpose?
    use further selection criteria tab.
    Amit.

  • F4 help for PO date field in VA01 transaction during upgrade

    Hi All,
    We are working on upgrade project 4.6c to ECC 6.
    We came across one scenario.
    F4 help for PO date field is not coming in newer version in VA01 transaction but i checked in older version it is coming F4 help for PO date(calender).
    May i know the reason regarding this.
    Any clues
    Regards
    Jai
    Edited by: Jayanth16 on Nov 12, 2009 6:14 PM
    Edited by: Jayanth16 on Nov 12, 2009 6:22 PM

    Hi,
    User did some changes in include LSDSDF05 due to that F4 help is not coming.
    So i correct that one.
    Regards
    Jai

  • Is there a way to import a indd CS4 file with its Data Fields names and properties into CC?

    I have to convert numerous files from CS4 to CC. The CS4 files are using external data from a CSV file. When I open the file in CS4 I can enable the preview and see the data from the CSV file. But when I save the file as indd or idml and try to open it in InDesignCC then I can't see the data as preview. I can see the Data fields (text).I think it's because it doesn't recognize the data fields from the CS4 file. If I delete a data field and remap it I will be able to see the preview for the field I just mapped. the other fields remain the unchanged, like they were just text.
    Any help with this topic will be very appreciated. I have about 70 data fields per document and about 100 documents to go through.
    Update: The symbol for a data field, ex: «fullname_2» change size when I delete and remap it. Explanation: When I open the CS4 file in IndesignCC I can't view a preview of the Data field(s) (almost positive because it's plain text). The data fields show like this «fullname_2». But when I delete that and drag a field from the data field list it shows like this <<fullname_2>>. So definitely, CC is not reading the data fields from InDesign CS4.
    P.S.: The fields above («fullname_2» and <<fullname_2>>  are copy and paste from Indesign CC.

    I'm attaching this image so this forum can notice the difference on the Data fields from CS4 and the ones added on CC

  • How to create a group with multiple data fields

    Post Author: RichS
    CA Forum: Formula
    Using CR XI.  Using CSV input from ODBC text driver.  No problems here.
    There are 3 fields that I want the same group by action.  Is this possible?) 
    If any one of these 3 fields change I want some header information and column fieldnames to display.  The header information I only want displayed on the first page (on the change) and the column fieldnames to display on every page.  I have played around with things like "InRepeatedGroupHeader" and "report group header on each page".  I am not getting all the results that I am looking for though.
    I want report to look like:
    Page header stuff  (to display on every page)  This data consists of some fields that will have static data and will display on every page.  And it consists of 3 non-static fields that I want to group on. 
    Group header stuff that I only want displayed on the first page on a change from one of the 3 fields mentioned above.
    Column headings that I want displayed on every page.
    Details data
    Group footer stuff (details not important for this)
    I get the expected output (column headings displayed on every page, and group header stuff display on the first page on each group change) with one group field.  But I want the group change to happen for all 3 fields.
    It seems simple but I can't find a way to create a "group" so if "field1 or field2 or field3" change, I get the same "group by" action.  I just need to know how to get the expected action.
    I expect that I might have some terms mixed up and/or some important information that would aide you in helping me.  If that is the case please re-post and I will add any missing or mis-stated information.
    Thanks,

    Post Author: V361
    CA Forum: Formula
    I am slightly confused, but perhaps you can create a formula
    Then group on the formula.  If this is not what you want, could you post some sample data, with the desired results.

  • Can someone help with auto-size fields in forms?

    I created a form in Acrobat for my team members with auto-size text fields that allow to shrink the text when the field size is not large enough to show the entire text. When I then open the same form file with Adobe Reader on my machine with text that has shrunk in some field, I can see all the text and have also a scroll function when the text size has reached its lower limits and there is still more text to show.
    However, when I receive the filled out forms back from other team members' iPads (they use my template created with Acrobat), the text didn't shrink as on a PC version and the scroll function is disabled. I checked the template and the fields are correctly set to auto-size left and they do work on my PC's and laptop's Adobe Reader. But the iPad version of Adobe Reader may cause some issues.
    Can anybody help with solutions?
    Thank you!
    Klaus

    The filled version of your PDF document (20140722 Daily Meeting Report...pdf) is no longer a PDF form because it has been flattened.
    Once an interactive PDF form (such as your template version) is flattened, all form fields are replaced with images of filled data.  You can no longer interact with form fields, edit form data, or tap/click any buttons in the flattened PDF document.  That is the reason why the text in auto-size text fields did not shrink.
    When you email a PDF document (including a PDF form) in Adobe Reader for iOS, the E-mail Document dialog is displayed.
    In this particular case, your team member must have selected "Share Flattened Copy".
    If you would like to keep the interactivity of a PDF form, you can select "Share Original Document".  Please advise your team members to select the "Share Original Document" option when emailing filled forms.
    Unfortunately, once flattened, a PDF document cannot be reverted back to the original "unflattened" state.  However, if your team members still have the original filled forms, they can resend the forms with the "Share Original Document" option.
    Please let us know if you have further questions.

  • Help with a password field

    I have a Flash site I'm working on that has a private login
    area. The login is not meant to be high security, we just want to
    limit access to current and potential clients who we give a
    password to.
    Here is the site in
    progress.
    What I need help with is the client login window. The login
    field is in a pop-up when you mouse over the word "client login."
    The temp password is forumdemo. When you use the button after
    typing in the password, everything is fine. But when you use the
    enter key, it initiates the "incorrect' action every time, even if
    the password is correct.
    This is driving me crazy because when I originally built the
    login box as an entirely separate movie, the enter key worked fine.
    If you want to see it working, just click on the "client login"
    words rather than using the pop-up box.
    The code is the same in both. The only difference is that the
    password field, button and other elements are now a Movie Clip.
    Anybody have any thoughts? The scripts are below; developed
    with the help of people on this forum (thanks!).
    Ignore everything else - the content is not finalized. The
    final site will be our company website, with work samples and the
    like, and the main page will include a working demonstration of
    what we can do with Flash 8 and green screen video. We haven't
    finished that stuff yet.

    I tried. it didn't quite do it.
    I don't know how to trace the value of things, I'm still
    lurnin', but what I did do, is replace the _root.password.text with
    all of the following
    _parent.password.text
    _parent.loginPopup.password.text
    _root.loginPopup.password.text
    _root.loginPopup.password
    I'm sorry to say none of them fixed the problem, and I think
    my problem is that I don't know what you mean by tracing the value.
    Well, I know what you mean, but I don't know how to do it. I'll dig
    into the documentation, but if you or anyone has an easy answer,
    I'll take it!
    Thanks, I appreciate your help and all the help I've gotten
    on this forum building that site.

  • Help with City, State Field

    Hi
    I need help in take one field with the City, State to 2 fields. One with City and the other State. I know how to take 2 fields into 1 but what is the script for 1 into 2 using the "," has the divider?
    Thank you in advance!

    Have a look here: http://w3schools.com/jsref/jsref_split.asp

  • Work flow help - forward a date field by a specified call frequency

    Hi There, I have a 'Last Call Date' field and a 'Call Frequency' picklist with values 'Monthly, Quarterly and Yearly'. I would like to forward another field called 'Next Call Date' according to the call frequency chosen.
    Is it also possible to automatically create a task to make that 'Next Call' and populate my calendar?
    Thanks

    Domenic,
    It won't do what you want it to do, the task due date will only forward from the date the workflow ran. But i do vaguely remember finding in the help files somewhere a way to add to a date. So you could possibly create a new field called forward call date and have the workflow update this date with last call date + x days.
    I found this in the help file under Expression Builder - Today ()
    Today's date and time (for example, 01/02/08 11:15:22).
    It is possible to perform calculations with date-time fields in
    calculated fields. When a number is entered in a date-time
    field, days are represented by integers; hours, minutes and
    seconds are represented by fractions.
    For example, to add one minute to the current date and
    time, use the following expression, which is derived from
    the fact that one day has 1440 minutes:
    Timestamp() + 1/1440
    Can't help any more than this as I've not tried to add to a date field, maybe someone else has another idea?
    Good luck
    cheers
    Alex

  • Please help with dynamic form field names in cfloop

    Hi,
    I need to create a form with day, date, month, year and time for 12 months
    Instead of coding them 12 times, I create day,date,month,year and time fileds in my form 1 time and then I use cfloop from="1" to="12" index="i" to loop these form fields 12 times.
    I gave each form field name such as: <input type="text" name="ScheduleDate_# i #" value=" "> this way each of those field will be named differently such as:
    ScheduleDate_1, ScheduleDate_2,ScheduleDate_3, ScheduleTime_1,ScheduleTime_2, etc
    I'm facing problem when this form is submitted, I think the error has something to do with the pound sign (##) when it comes to updating the back end
    I use MS SQL
    It doesn like this:
    <CFLOOP From="1" To="12" index="k">
    <CFIF Len(Trim(Form.MeetYear_#k#)) NEQ 0 AND Len(Trim(Form.MeetTime_#k#)) NEQ 0>
    <cfquery name="CreateSchedule" datasource="#DSN#">
    UPDATE TableSchedule 
    SET SchedDay = <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedDay_#k##">,SchedMonth =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedMonth_#k##">,SchedDate =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedDate_#k##">,SchedYear =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedYear_#k##">,SchedTime =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedTime_#k##">
    Where SchedId = <cfqueryparam cfsqltype="cf_sql_numeric" value="#k#">  
    </cfquery>
    </CFIF>
    </CFLOOP>
    Can anyone help please?

    You can't nest hash marks. Do this instead:
    SET SchedDay = <cfqueryparam cfsqltype="cf_sql_varchar" value="#form["SchedDay_" & k]#">
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • Comparing a MaxDate with another Date field

    Hi there,
    I am trying to create a report that has  components on it, ReportDate, MaxReportDate, and JobID. I want to compare a max date with another date in my Web Intelligence report. For example, I have a field called Report Date. I have applied the Max() function to find the most recent date in the list of Report Dates. Therefore, I used this:
    Max([ReportDate]) --> MaxReportDate
    Then I want to compare the original Report Date field with the MaxReportDate and return the JobID if the ReportDate = MaxReportDate. Therefore, I used this for the JobID2 formula:
    = [JobID] where (ReportDate = MaxReportDate)
    This is not working. Am I doing somehting wrong? By the way, I am using SAP Business Objects BI Platform 4.0 Client Tools (version 14.0.2.364).
    Please help! Thanks!
    -Janice

    I did create a variable called MaxReportDate with the formula Max(ReportDate). When I test this variable, it works perfectly fine. However, when I use it to compare against ReportDate, there's where it gets tricky. 
    So it looks like the If ReportDate=MaxReportDate then JobID works. However, if I try to replace JobID with any other Measure variable, it does not return accurately. For example, say I have the following data:
    ReportDate Price
    11/30/2011  10
    13/30/2011  15
    I put it the following formula to get the price for the max report date:
    If [Report Date] = [MaxReportDate] then [Price]
    It should give me 15. Instead, it sums the numbers and I get 25.  Why is that?

  • Weird errors with a DATE field in a certain row

    We have a table with an exp_date field of DATE datatype. One row is giving us mysterious problems.
    If I query the row in sqlplus, the exp_date field displays 18-Jun-04. The same query in Oracle SQL Developer displays 19-Jun-04. The same query in TOAD returns a NULL field, and adding "exp_date IS NULL" to the query returns no rows (since it really isn't NULL!).
    In sqlplus, if I use trunc() or round() on exp_date, it gets bumped up to 19-Jun-04.
    This field for this record is causing some issues in our java classes as well, we're adding some more logging/exception handling to find out exactly what they are.
    Any thoughts?
    FWIW this is on Oracle 10gR2 (10.2.0.2).
    Message was edited by:
    dtseiler

    what happens if you do the following on all three different environments:
    SQL> select to_char(exp_date, 'dd-mon-yyyy hh24:mi:ss') from your_table where your_condition ;
    [pre]

  • Problem with displaying Date field in the table.

    Hi All,
    I am trying to display data into a table UI Element. 
    In that data, i have one DATE type field. While displaying data in DATE field, it will display like this "01.02.2009".
    Now my requirement is if i want to modify that DATE field, it will allow to modify "01.02.2009"  to "26.02.2009".
    But while modifying DATE field , I want to show the Calender of that month, in that i  have to select the another date.
    (Like normal Date UI Element will show that calender).
    Can anyone please help me.
    Thanks in Advance!
    Regards,
    Sreelakshmi.

    Hi,
          Go to the context attribute that was mapped to the DATE field of the table and change the perperty INPUT HELP MODE to  AUTOMATIC and it works.
    Regards,
    Manne.

Maybe you are looking for

  • How to convert Data Decryption coded in VB to Java

    Hi! Can anyone help me on converting the following VB code to Java? 'Purpose: This function decrypts the password of the user in the database so that ' it can be matched accurately with the inputted password of the user in ' the Log-In form (Case-sen

  • How to add Portal iViews with Web Page Composer

    Hi, We are working with Web Page Composer in EP7.0 SP13. We are creating web pages and we would need to add Portal iViews into. When we try to add an iView, we cannot select it from Web Content Browser to drop into the web page container. How can we

  • Highlight/Shadow Clipping Indicator - Show the image too.

    The highlight/shadow clipping indicator feature (Alt/Exposure or Alt/Blacks on my PC. Not sure what it is on a MAC)is marvellous and indispensible. But, it could be better, in my view. When you are checking for clipping using this feature, the image

  • The export movie file could not be created

    I have made a slideshow in iPhoto08 and attempting to export it to +iDVD by Share --> Send to iDVD+. The first window message I see is that the request is hanging up on +You have selected a single photo. Send just one photo to iDVD?+ I click on +Send

  • Exporting keypair in 1.0.1

    Hi Exporting keypair (.p12) in 1.0.1 do not ask for password, it provide it for download directly. But if importing them, it ask for them. What is the password used in the p12-file ? Thanks Markus