Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to trigger an event with jquery?

Posted on 2012-03-28
2
Medium Priority
?
361 Views
Last Modified: 2012-03-28
I have two text boxes as a date fields and I need that after altering the first one, the second one automatically shows a new date (a month after the previous date)

The second field can be modified manually, the event only must be triggered after altering the first text box / date.

Regards.
0
Comment
Question by:dimensionav
2 Comments
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 1000 total points
ID: 37776573
you can bind the blur event to first textbox

$("#textbox1").bind("blur", function(){

 $("#textbox2").val(calculateNextDate());
});

function calculateNextDate()
{
}
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 total points
ID: 37776728
You might make a Google search for "jQuery Date Picker" - there are a lot of solutions that will work for this sort of thing.  Not exactly what you want but a good demonstration of the principles is available here:
http://jqueryui.com/demos/datepicker/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question