Hassan Voyeau
Hassan Voyeau

Reputation: 3624

datePicker dateFormat

I am trying to format the date returned from the date-picker and it is not working, it keeps returning the default mm/dd/yyyy.

I'm using the following code:

$('#<%=TextBox1.ClientID %>').datepicker({ dateFormat: 'dd-mm-yy' });

Upvotes: 0

Views: 102

Answers (1)

lante
lante

Reputation: 7336

to get your date formatted use:

var date = $('#datepicker').datepicker({ dateFormat: 'dd-mm-yy' }).val();

Upvotes: 1

Related Questions