Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8294931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:24:26+00:00 2026-06-08T14:24:26+00:00

I am using jquery tools date input . In my application i have a

  • 0

I am using jquery tools date input. In my application i have a feature that allows the user to check his personal data based on date range.

I have an input text field which loads the date Input functionality. When the user select a date it displays it in : “dddd dd, mmmm yyyy” format in the text field.
What i am trying to do is to add 7 days (ie a week) and display the new date in the upper range container, to explain more this is how it looks:

From: Friday 18, May 2012
To: //here is where i want it to be : Friday 25, May 2012

I am trying to use the built in api function :addDay(amount) but it seems not to work.
I have the following code:

var ret_date = $(this).data("dateinput").getValue('dddd dd, mmmm yyyy');
//I tried: $(this).data("dateinput").addDay(7).getValue('dddd dd, mmmm yyyy')
//but it kept the same currently selected date
$("#to_field").html(ret_date);

I searched online and SO but couldn’t find a solution. I am not generally a front end developer so my knowledge with javascript/jquery is not advanced.

Any help is much appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:24:29+00:00Added an answer on June 8, 2026 at 2:24 pm

    By the way, this is what i ended up doing and it worked:

    $("#DateField").change(function(event, date) {
            //I used format: yyyy-mm-dd
            var ret_date= $(this).data("dateinput").getValue('yyyy-mm-dd');   
            //Format the date using javascript
            //--> For that 2 javascript prototypes have been created(check at the end of the answer)          
            var myDate = new Date(ret_date);
            myDate.setDate(myDate.getDate()+7);
            $("#FinalDateField").html(myDate.dateFormat("Y-m-d"));
    });
    

    The prototypes:

    Date.prototype.dateFormat = function(format) {
      var result = "";
      for (var i = 0; i < format.length; ++i) {
        result += this.dateToString(format.charAt(i));
      }
      return result;
    }
    
    Date.prototype.dateToString = function(char) {
      switch (char) {
      case "Y":
        return this.getFullYear();
      case "m":
        return this.getMonth() + 1; //Since months are zero based, add 1
      case "d":
        return this.getDate();
      default:
        return char;
     }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jQuery Tools v1.2.7 and jQuery v1.7.2. I have the following code:
I am using the jQuery Tools Scrollable plugin - http://flowplayer.org/tools/scrollable.html#navigator I have created a
I have an issue retrieving ajax data using jquery 1.3.2 / 1.4.2: It works
I hope somebody can help. I have been using JQuery Tools to validate my
I am using jQuery Tools Validator to ensure that my form fields are not
I have setup some tabs using jquery tools and the history plugin. When i
I have an app built using jQuery (and using various jQuery-UI tools). For some
I am using jQuery Tools to create a tabbed box that gets content via
I am using jQUery Tools to create a scrollable with navigation that autoscrolls. Now
I'm trying to make tooltips appear using jQuery Tools' tooltip feature. When the mark

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.