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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:14:40+00:00 2026-06-10T13:14:40+00:00

I use jQuery datepicker with the following code $(.item).datepicker({ showWeek: true, firstDay: 1, minDate:

  • 0

I use jQuery datepicker with the following code

$(".item").datepicker({
  showWeek: true,
  firstDay: 1,
  minDate: -30,
  dateFormat: 'mm-dd-yy'
});

The value of that datepicker will be sent via ajax to php function which insert a data in mysql table.

The date column type from mysql database is Datetime.

Every time when read value from datepicker input value, the date column in database is empty shows 00-00-0000 00:00:00.

I am newbie in php and maybe I made somewhere a mistake.

the php piece of code

mysqli_query($connect, "Insert into tab(date) values ('".$myData."')");

how to format javascript date in that right for mysql ?

  • 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-10T13:14:41+00:00Added an answer on June 10, 2026 at 1:14 pm

    Can you first verify that the datepicker is posting a correct value to the server?

    Try alert the value somewhere.

    If you have the correct input from the javascript, the php part of the script can be done like this:

    if (isset$_GET['date']){$date=$_GET['date'];}
    $date=date("Y-m-d h:i:s",strtotime($date));
    

    Echo out to confirm you have it right, and finally insert that $date into the table.

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

Sidebar

Related Questions

I use a jquery datepicker then i read it in my servlet like that:
I want to use the jQuery UI Datepicker for the following scenario. The user
I'm trying to use the following plugin for date picking: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html And I'm trying
I use the jQuery UI Datepicker plugin and I found that if the plugin
I use the following datepicker.php page for jquery datepicker is given below: <!DOCTYPE html>
When I want to get the value in datepicker I use the following var
I use the JQuery datepicker , and the problem is that I generate the
I'm trying to use the jquery datepicker (the ajax control toolkit one will not
I use jQuery UI Datepicker. var dates = $( #checkinTxt).datepicker({ numberOfMonths: 2, changeMonth: true,
I'm looking for the right wildcard character to use with jquery.datepicker.parseDate() in the doc

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.