StuBlackett
StuBlackett

Reputation: 3857

jQuery UI DatePicker - Date Format

I've got a simple datepicker on my site.

Example is : here

I need the date format to be YYYY-MM-DD ONCE the date has been selected - This so that it can be entered into the DB in a suitable format.

How do I achieve this.

Any help much, much appreciated.

Upvotes: 0

Views: 747

Answers (1)

Jayendra
Jayendra

Reputation: 52769

use -

$( ".selector" ).datepicker({ dateFormat: 'yy-mm-dd'})

Upvotes: 2

Related Questions