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

  • Home
  • SEARCH
  • 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 8114073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:02:24+00:00 2026-06-06T03:02:24+00:00

I have an edit form, where the values are populated from the database. I

  • 0

I have an edit form, where the values are populated from the database. I have one date field in the format yyyy-mm-dd. I have setup the jQuery Datepicker and its working on the date field, however, when the form first loads, the date field is empty even though the input type has a value from the database, when I checked the HTML source.

How can I make my date field display the date from the database?

EDIT:

I want my input values to be visible in the text field rather than grabbing the values from database and again inserting it into a jQuery/javascript variable/function(default date, showbefore what not).

What can I do to disable datepicker from hiding my values in the first place? and only replace the values if I click and choose a date.

HTML Code:

<input type="text" id="date" name="reg_date" value="2012-01-30" />

The actual code is in PHP where the value is being retrieved from database and inserted in the value field. The values are correctly generated and inserted because I verified it by looking at the HTML source in firefox.

Datepicker setting:

$(function() {
    $( "#date" ).datepicker({
        changeMonth: true,
        changeYear: true
});
    $( "#date" ).datepicker({ dateFormat: "yy-mm-dd" });
    $( "#date" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
});
  • 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-06T03:02:27+00:00Added an answer on June 6, 2026 at 3:02 am

    change for this:

    $(function() {
        $( ".date" ).datepicker({
            dateFormat: "yy-mm-dd",                 
            changeMonth: true,
            changeYear: true
        });
    });
    

    if your browser has cached … press CTRL + F5

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

Sidebar

Related Questions

I have a form to edit a database table that's populated by setting the
I have this function to edit all fields that come from the form and
I have a spinner which is populated from the database. This in turn is
Say I have two fields in a new or edit form: <%= f.text_field :email
I have a simple form where a user can add, edit, and delete people
I have 2 edit texts. I will type a message in one of the
I have an edit page that fills the content with the original content from
I have a form where users can store and edit their skills in different
I have a simple content edit form (Zend_Form) that I populate() with an array
Hi I have the following view that gets the values for the form fields

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.