Jump to content

Formating Date


wispas

Recommended Posts

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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.