Results 1 to 2 of 2

Thread: Date script

  1. #1
    Join Date
    May 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Date script

    Hi,

    Thank you in advance for your support.

    I was wondering if it's possible to add to the following scripts where the 2nd script adds 1 year from the current date automatically when the form that it's part of is loaded. By default, they both load with the current date.:

    <script>DateInput('issue_date', true, 'MON-DD-YYYY')</script>
    <script>DateInput('valid_thru', true, 'MON-DD-YYYY')</script>

    so any date chosen on the first script adds one year to the second script automatically instead of having to choose it.

    Thank You.

  2. #2
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by lnxfrk View Post
    Hi,

    Thank you in advance for your support.

    I was wondering if it's possible to add to the following scripts where the 2nd script adds 1 year from the current date automatically when the form that it's part of is loaded. By default, they both load with the current date.:

    <script>DateInput('issue_date', true, 'MON-DD-YYYY')</script>
    <script>DateInput('valid_thru', true, 'MON-DD-YYYY')</script>

    so any date chosen on the first script adds one year to the second script automatically instead of having to choose it.

    Thank You.

    Is this any help?

    <html>
    <head>
    <script type="text/javascript">
    function displayDate()
    {
    document.getElementById("demo").innerHTML=Date();
    }
    </script>
    </head>
    <body>

    <h1>Time and Date</h1>
    <button type="button" onclick="displayDate()">Display Date</button>

    </body>
    </html>

    Hope it helped!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •