Formating datepicker to 'Month dd, yyyy' and then converting from 'Month dd, yyyy' to 'yyyy-mm-dd' for SQL
in Using jQuery UI
•
8 years ago
I am new to jquery and the use of jquery-ui datepicker, so please bear with me. I am using jquery-ui datepicker to allow the user to choose their birth date which is displayed in a form input text box. I would like datepicker to display the date in a format such as ‘January 24, 1968’. I currently have it displaying the 'yy-mm-dd' format because that is what works to store it in SQL, which I need to do. So, my question is twofold: 1. how do I get datepicker to display, in the input text box, a format that looks like ‘January 24, 1968’, and 2. How do I then write a php function to change the value from the ‘January 24, 1968’ format to the ‘yy-mm-dd’ (1968-01-24) format for SQL when the submit button is pressed?
1