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 6923139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:29:49+00:00 2026-05-27T10:29:49+00:00

I currently have 3 inputs, one for day, one for month and one for

  • 0

I currently have 3 inputs, one for day, one for month and one for year. I want to make it so a user can type in the date without pressing tab or clicking in next input. The user would be able to type 12102011 and it would populate correctly into the 3 input fields. I am not sure the best way to do this, if its with jquery, css or html.

This is the html I have:

<div>
    <input class="dateSpinDay" type="text" maxlength="2"/> 
    <span>/</span> 
    <input class="dateSpinMonth" type="text" maxlength="2"/> 
    <span>/</span> 
    <input class="dateSpinYear" type="text" maxlength="4"/>  
</div>

here is the fiddle I start with the above code
http://jsfiddle.net/dan_vitch/AxUvu/

  • 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-05-27T10:29:50+00:00Added an answer on May 27, 2026 at 10:29 am
    //force only numeric characters in all the text-boxes
    $('.dateSpinDay, .dateSpinMonth, .dateSpinYear').on('keyup', function () {
        this.value = this.value.replace(/[^0-9\.]+/g, '');
    });
    
    //focus the month text-box if the value of the day text-box is 2 characters
    $('.dateSpinDay').on('keyup', function () {
        if (this.value.length >= 2) {
            $('.dateSpinMonth').focus();
        }
    });
    
    //focus the year text-box if the value of the month text-box is 2 chracters
    $('.dateSpinMonth').on('keyup', function () {
        if (this.value.length >= 2) {
            $('.dateSpinYear').focus();
        }
    });
    

    Here is a demo: http://jsfiddle.net/rJwyE/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a wysiwyg iframe where the user can submit input to another
Currently I have Input: e.g., '123456789'.'+'.'987654321' Desired Pattern: Output: e.g., '123456789987654321' How can I
I have one slider to select time range, from 1 (,2,3,..) day (,weeks,months,..) ago
Hopefully a simple one. I have the following form validation rules: $this->form_validation->set_rules('timeStart', 'Day Start
I have a form-1 which has 4 fields. when the user inputs data in
I currently store user's inputs in comma separated lists like so: Userid | Options
In my iPhone app I have a settings page where a user can enter
I have a checkbox list for weekdays and I want to make sure that
Currently I have two pages: The first page contains an input form, and the
I have a challenge I need some input on. I am currently recruiting programmers

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.