wispas Posted March 23, 2011 Share Posted March 23, 2011 I have attached a file with a date picker script that i ahve been using and working on. Everything works perfectly the way i want it to work, However when the date is inserted into the text field it comes out as '2011-03-01' Now.. i need it in this way as i am collecting this information and sending it to my MySQL query, but is there a way i can change it so it visually displays as '1st March 2011', but still go into the database as '2011-03-01' so i can continue to do my query as well as making it visually look good with some sort of JavaScript date formatting. Can anyone please take a look when they have a momemt. Thanks! [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
tomfmason Posted March 23, 2011 Share Posted March 23, 2011 You should post some of the relevant code as I doubt many, if any, people will download your zip. If you are using JQuery there are several existing plugins that should make your life a lot easier. Otherwise you could use a hidden textfield to store the original date format for use in the db and then use something like this to convert that into a more user friendly version. Quote Link to comment Share on other sites More sharing options...
nogray Posted March 23, 2011 Share Posted March 23, 2011 If you use the NoGray Calendar http://www.nogray.com/calendar.php you can set the date_format option to "jS F Y" and leave the server_date_format as the default "Y-n-j" you would get exactly what you need. Disclaimer: I am the developer of the NoGray Calendar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.