Date popup needed, that will return YYYY-MM-DD format

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Date popup needed, that will return YYYY-MM-DD format

Post by simonmlewis »

I am looking for a simple popup script that shows a calendar, to select the date, and that date appears in the Input field, int he format: YYYY-MM-DD.

I did find a good one, but you had to tell it first the format within the form, and without changing the format to the desired one it would not work; not even if it was set to that format by default.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Date popup needed, that will return YYYY-MM-DD format

Post by simonmlewis »

Funnily enough that is the very one I Was trying, but you have to add the dropdown option to enable the formatting of the date, and then you have to select the format to change the date.

I Want the user to be able to just select the date and it automatically uses said format.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Date popup needed, that will return YYYY-MM-DD format

Post by Celauran »

simonmlewis wrote:but you have to add the dropdown option to enable the formatting of the date
No you don't. http://api.jqueryui.com/datepicker/#option-dateFormat
Post Reply