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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:57:34+00:00 2026-06-07T19:57:34+00:00

So, I am a real beginner in js and I have a form with

  • 0

So, I am a real beginner in js and I have a form with 2 inputs. In this inputs I have date pickers so that the user can select a date from a calendar. But the db from the site I work on has this date format: Y M D 0000:00:00. I want to add those zeros at the end automatically when a user selects a date. Don’t know if anyone can help, but thanks.

window.onload = function(){
        new JsDatePick({
            useMode:2,
            target:"inputField",
            dateFormat:"%Y-%M-%d"
        });
        new JsDatePick({
            useMode:2,
            target:"inputField2",
            dateFormat:"%Y-%M-%d"
        });
    };
<form action="insert.php" method="post" target="000:00:00 "onsubmit="return validateForm(this)">
<label for="FUP start date">FUP start date:</label> 
<input type="text" name="inputField" id="inputField"/>
</br>
</br>
<label for="FUP end date">FUP end date:&nbsp;</label> 
<input type="text" name="inputField2" id="inputField2" />
  • 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-07T19:57:36+00:00Added an answer on June 7, 2026 at 7:57 pm

    I’m assuming you can simply alter the dateFormat given to each JsDatePick to include those zeroes, like so:

    new JsDatePick({
      useMode: 2,
      target: "inputField",
      dateFormat: "%Y-%M-%d 0000:00:00"
    });
    

    It would be helpful if you could provide information on the date picker you are using.

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

Sidebar

Related Questions

Real noob question no doubt, but I can't get my head around this behaviour.
This is a real beginner Hibernate problem. I have a problem with the mappings
probably this is a real beginner question, but i cannot find an answer on
I have this code to load the month of the birthday that corresponds to
I know that my this question may sound pathetic to you but as a
I am a real beginner at this so sorry if I am makin awfull
I'm a beginner in jQuery area and I have simple question like this :
Real odd one to get stuck on but weirdly I am. You you have
I'm interested in wed development and web 2.0 but I'm a real beginner, so
A real beginner here, I am looking to have a table of static data

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.